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:
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 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 (한국어)