Quantzone

Matlab Finance Code

Energy Trading & Risk Management with MATLAB Webinar Case Study

MATLAB code for the generation asset risk analysis case study

Improving MATLAB® performance when solving financial optimization problems

Optimization algorithms are commonly used in the financial industry with examples including Markowitz portfolio optimization, Asset-Liability management, credit-risk management, volatility surface estimation etc. Many optimization problems involve nonlinear objective functions and constraints. These problems can be computationally expensive, especially with numerically estimated gradients. We have seen many cases where optimizations were sped up by incorporating pre-computed analytical derivatives.

GARCH,EGARCH,NAGARCH,GJR models and implicit VIX

Estimate GARCH/EGARCH/NAGARCH/GJR parameters from a time series of prices , rates and VIX  value.

Get U.S. Stock Symbols

getStockSymbols obtains symbols in U.S. stock markets or symbols of U.S. index components. The function also outputs the company name, sector type, market cap, p/e, last price, last price percent change and volume in the second output parameter in the form of structs. These data are pulled from http://finviz.com.

For basic fundamentals, see:
http://www.mathworks.com/matlabcentral/fileexchange/34075-get-stock-information-from-yahoo

For daily open-high-low-close, see the below

http://www.mathworks.com/matlabcentral/fileexchange/18458-historical-stock-data-downloader

http://www.mathworks.com/matlabcentral/fileexchange/25433-google-finance-historical-stock-data-downloader

For intraday open-high-low-close, see:

http://www.mathworks.com/matlabcentral/fileexchange/32745-get-intraday-stock-price

While for options, see:

http://www.mathworks.com/matlabcentral/fileexchange/37981-get-stock-option-chains

Have fun!

Download Daily Data from Google and Yahoo! Finance

This archive contains functions for downloading daily stock price information from both Google and Yahoo! Finance as well as helpful utility functions. It furthermore contains a (basic but decent) example of a unit test harness created using MATLAB’s functional unit test framework.

The utility functions allow you to convert the Google-formatted ticker symbols to the Yahoo! format and vice versa. Since Google does not provide adjusted closing prices, a helper function that uses dividend information to calculate them is automatically called.

Both Google and Yahoo! seem to allow the use of financial data for PERSONAL, INFORMATIONAL use ONLY and do not warrant against inaccuracies. These discrepancies are fairly common and are the main reason that this suite uses both Yahoo! AND Google data — only if both sources agree on a piece of data should you begin to trust it.

Using MATLAB to Optimize Portfolios with Financial Toolbox

Using MATLAB to Optimize Portfolios with Financial Toolbox (145.4 KiB)

  • About

    Matlab Finance Code Collector

  • Tag Cloud

  • Recent Comments

  • Meta