How to Execute a Custom MATLAB Function in Excel
Execute a custom MATLAB® function using data from Microsoft® Excel® and display the results in Excel. The reason is to extend Excel with the computational and visualization capabilities of MATLAB. The custom MATLAB function creates random stock paths using Monte Carlo simulation. It simulates random stock paths using Geometrical Brownian Motion.
Published: 9 Oct 2019
In this video I am going to show you how to execute a custom MATLAB function using data from MS Excel and display the results in Excel. The reason is to extend Excel with the computational and visualization capabilities of MATLAB.
The custom MATLAB function creates random stock paths using Monte Carlo simulation.
Monte Carlo simulation of a stochastic process is a procedure for sampling random outcomes for the process.
The custom function that I created, Paths, takes as inputs the GBM parameters and generates the stock paths. In this example we will generate 65,000 EuroStoxx paths for 21-time steps and visualize 500 paths starting at S0, which is the last available price for the index in question.
- First, we bring the Excel data into MATLAB.
- Next, we execute the custom function in MATLAB Paths.
- Finally, we bring the results back to Excel. The data in the worksheet updates.
We can see the 65,000 paths generated for 21-time steps.
To recap, using Spreadsheet Link, you can import a function already created in MATLAB and benefit from the computational speed and visualization capabilities of MATLAB directly from Excel.
To find out more about Spreadsheet Link applications, please visit the Spreadsheet Link product page where you can read the documentations, watch additional videos, and find examples. Thank you for watching.
Featured Product
Spreadsheet Link
Up Next:
Related Videos:
Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
- América Latina (Español)
- Canada (English)
- United States (English)
ヨーロッパ
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
アジア太平洋地域
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)