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:
Seleccione un país/idioma
Seleccione un país/idioma para obtener contenido traducido, si está disponible, y ver eventos y ofertas de productos y servicios locales. Según su ubicación geográfica, recomendamos que seleccione: .
También puede seleccionar uno de estos países/idiomas:
Cómo obtener el mejor rendimiento
Seleccione China (en idioma chino o inglés) para obtener el mejor rendimiento. Los sitios web de otros países no están optimizados para ser accedidos desde su ubicación geográfica.
América
- América Latina (Español)
- Canada (English)
- United States (English)
Europa
- 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)
Asia-Pacífico
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)