##
__Financial Applications of MATLAB __

__Financial Applications of MATLAB__

**Our course on MATLAB**

**WizIQ Link**

http://www.wiziq.com/course/7225-matlab-for-financial-engineering

http://www.wiziq.com/course/9291-1-on-1-matlab-course

**One on One Course:**http://www.wiziq.com/course/9291-1-on-1-matlab-course

Join our MATLAB for financial engineering course (http://www.wiziq.com/course/7225-matlab-for-financial-engineering) & get 15% discount. Ask for discount code, email - info@qcfinance.in

**Website**- http://qcfinance.in/

**YouTube Channel-**http://www.youtube.com/user/shivbhaktajoshi

In this post I am going to talk about how to use MATLAB for Financial Risk Management. Also for Fixed Income in general. There is a big file of fixed income of 500 pages which MATLAB has provided.

**Areas to look at in Finance to start with are:**

- For those who have not done Programming before the logical flow like For statement becomes the first Hurdle.
- Regression using MATLAB.
- Symbolic computations.
- Making Chart: Polyval(c,x) to make the long elements that can be then used for making chart.
- Different way to make different type of matrix, like equal, incremental etc.
- Matrix division vs Element by element division.

**Program 1:**Consider writing a user-deļ¬ned function that searches a matrix input argument for the element with the largest value and returns the indices of that element.

**Book Review: MATLAB Basics and Beyond:**This book has lot of graphic and graphics and data type forms the heart of stuff that are done.

**Book Review: MATLAB Primer**

**FRM Level 2 terms in MATLAB Stat toolbox:**

- Copula
- Modelling Tail Data with the Generalized Pareto Distribution.
- Modelling Data with the Generalized Extreme Value Distribution.
- Bayesian Analysis for a Logistic Regression Model.
- Weibull distribution.

**Data Cleaning and management with MATLAB:**

- Playing with Array & Matrix.
- Errors and data cleaning Excel.
- Programs you have made on VBA.
- Old programs in MATLAB (questions on that).
- Movement and arrays of data.
- Time series analysis in MATLAB.
- Types of array / matrix / data types / vector arrays etc.
- Reducing and selecting of Matrix.
- Looping for data handing in Excel.
- Reading Data from SQL Database and linking the system (advanced and out of scope), MATLAB Database toolbox.
- Interpretation and Control.
- Trading MATLAB and importance of Visualization.
- Commodity trading in MATLAB.
- SAS vs MATLAB for Intermediary display.
- CDS MATLAB / VAR 99% VAR 1 day, this is interesting probability of default as well, bond valuation in MATLAB using some data.
- Loops for Array.
- CDS in MATLAB, article of Markit.
- Query Builder SQL Array.
- Struct http://www.mathworks.in/help/techdoc/ref/struct.html.

There was array handing, and how to manage data for Quant Finance...

__Preparing data for final analysis for:__Algo trading & VAR computations

**Five area of MATLAB you need to master:**

- StatisticalToolbox
- Symbolic computation toolbox
- Fixed income
- Econometrics (Monte Carlo)
- Derivatives

__Generic Knowledge about the industry needed:__

- Data -- Inter-phasing -- Output
- Spreads changing
- Bank Rating Consumer
- Shorting CDS
- Causes and Role of Goldman on Greece Crisis

__Interesting areas in MATLAB Finance where I am researching solutions are:__

- Data management or data cleaning or data optimization skills used in MATLAB.
- Loop for data correction like addressing blank or data types management.
- Optimizing data for time series.

__Three job profiles:__

- Bond spreads, CDS, fixed income etc (M).
- VAR, PoD, bond portfolio, companies bond, trading data and VAR for that, etc (G).
- Data cleaning for Time series, other data cleaning and optimizations (E).

**References:**

http://www.mathworks.in/help/techdoc/ref/struct.html

http://www.mathworks.in/help/techdoc/ref/size.html

http://www.mathworks.in/help/techdoc/ref/f16-42340.html

http://www.mathworks.in/products/matlab/demos.html?file=/products/demos/shipping/matlab/nddemo.html

__MATLAB for Finance by__*qcfinance.in*

This article will talk about various applications in MATLAB for finance. We have taken in real time issues in the recent months and discussed how we can simulate some on them on MATLAB.

- Old work ppt: Reliability, HPC, simulink etc.
- Data cleaning, data modifications, data arrays, struct, rating matrix, selection of elements from rating matrix, banks internal rating and pod computations, post that you made.
- Matlab for game theory.
- For fixed income Bond pricing, CDS, and other leveraged fixed income tools on MATLAB.
- Matlab for distributions and monte carlo.
- Data handing from sql and other parameters for MATLAB.
- MATLAB HPC toolbox to be used for various other options.
- Neural network in Finance.

There were few articles I found on MATLAB Credit Risk and there were many more on their website:

http://www.mathworks.in/products/finance/

**Conclusion**- MATLAB Credit Risk : Credit Risk Modeling Using Excel and VBA is a good book to look out for excel based modeling which then can be taken into MATLAB (link was on the references of the above articles)
- As far as the comparison goes, R vs MATLAB, MATLAB is much easier and the only reason people do R in west is because R is free and MATLAB is very expensive.
- As per my knowledge R and SAS are not so much user friendly, although when it comes to hardcore data handling SAS is much much better. MATLAB is good for easier applications.

Quantitative Analysis & Fixed Income Research:

- Back-testing of investment strategies.
- Credit risk modelling using KMV approach (Merton Model), there is a tool of Moodies, and also work on Municipal bonds (question in interivews).
- Monte-Carlo simulation.
- Portfolio optimization and asset allocation.
- Statistical modelling, variance-covariance modelling, value at risk modelling, regular risk reporting (hot spot reports, concentration reports), risk assessment and style analysis of money managers, term structure modelling, rich cheap analysis.
- Mark-to-market of fixed income instruments.
- Credit research reports covering liquidity and debt analysis (Equity based).
- Yield and CDS spreads.

Thus looking at them can help us understand how MATLAB can help us to work on these specific areas.

Passive Smart ETF

CMO

http://www.mathworks.in/help/fininst/using-collateralized-debt-obligations-cmo-.html

http://www.mathworks.in/help/fininst/cmoschedcf.html

http://www.mathworks.in/help/fininst/mbscfamounts.html

http://www.mathworks.in/help/fininst/cmoseqcf.html

http://www.mathworks.in/help/fininst/example-collateralized-debt-obligations-cmos-.html

http://en.wikipedia.org/wiki/Collateralized_mortgage_obligation

**Links to toolbox:**

statistical_toolbox.pdf

econometrics_toolbox.pdf

financial_derivatives_toolbox.pdf

financial_time_series_toolbox.pdf

fixed_income_toolbox.pdf

financial_toolbox.pdf

**Some Books to refer:**

- Elementary Stochastic Calculus With Finance in View (Advanced Series on Statistical Science & Applied Probability, Vol 6) (Advanced Series on Statistical Science and Applied Probability).
- Financial Options: From Theory to Practice.
- Paul Wilmott on Quantitative Finance 3 Volume Set (2nd Edition).
- Monte Carlo Methodologies and Applications for Pricing and Risk Management.
- Stochastic Calculus for Finance I: The Binomial Asset Pricing Model (Springer Finance / Springer Finance Textbooks).
- Modern Pricing of Interest-Rate Derivatives: The LIBOR Market Model and Beyond.
- The Analysis of Structured Securities: Precise Risk Measurement and Capital Allocation.
- Credit Derivatives Pricing Models: Models, Pricing and Implementation (The Wiley Finance Series).

**One on One Customized Training:**

qcfinance.in believes in personalized touch so that our clients are completely satisfied with our service. In this regard, we offer

**One on One Customized Training**to our clients.
These Training are provided on requests by our clients & are customized according to their individual needs.

The course structure & timings for these training are highly flexible, classes are scheduled as per the convenience of our clients.

**Contact Us for More details: info@qcfinance.in**