parsiad.ca - GNU Octave (2)









Search Preview

Parsiad Azimzadeh

parsiad.ca

.ca > parsiad.ca

SEO audit: Content analysis

Language Error! No language localisation is found.
Title Parsiad Azimzadeh
Text / HTML ratio 51 %
Frame Excellent! The website does not use iFrame solutions.
Flash Excellent! The website does not have any flash contents.
Keywords cloud = GNU Octave financial package SDE Carlo Monte pricing Timesteps stopping X_t dt call problem Azimzadeh BlackScholes Simulations MATLAB Optimal
Keywords consistency
Keyword Content Title Description Headings
= 32
GNU 17
Octave 17
financial 13
package 9
SDE 7
Headings
H1 H2 H3 H4 H5 H6
1 7 6 0 0 0
Images We found 3 images on this web page.

SEO Keywords (Single)

Keyword Occurrence Density
= 32 1.60 %
GNU 17 0.85 %
Octave 17 0.85 %
financial 13 0.65 %
package 9 0.45 %
SDE 7 0.35 %
Carlo 7 0.35 %
Monte 6 0.30 %
pricing 6 0.30 %
Timesteps 5 0.25 %
stopping 4 0.20 %
X_t 4 0.20 %
dt 4 0.20 %
call 4 0.20 %
problem 4 0.20 %
Azimzadeh 4 0.20 %
BlackScholes 4 0.20 %
Simulations 4 0.20 %
MATLAB 4 0.20 %
Optimal 4 0.20 %

SEO Keywords (Two Word)

Keyword Occurrence Density
GNU Octave 16 0.80 %
Octave financial 11 0.55 %
financial package 8 0.40 %
Monte Carlo 6 0.30 %
is the 5 0.25 %
in GNU 4 0.20 %
Optimal stopping 4 0.20 %
Parsiad Azimzadeh 4 0.20 %
with the 3 0.15 %
and the 3 0.15 %
pricing a 3 0.15 %
Brownian motion 3 0.15 %
the GNU 3 0.15 %
= 40 3 0.15 %
Selected publications 3 0.15 %
pricing problem 3 0.15 %
in this 2 0.10 %
the BlackScholes 2 0.10 %
referred to 2 0.10 %
MATLAB Financial 2 0.10 %

SEO Keywords (Three Word)

Keyword Occurrence Density Possible Spam
GNU Octave financial 10 0.50 % No
Octave financial package 7 0.35 % No
in GNU Octave 3 0.15 % No
the GNU Octave 3 0.15 % No
= exp r 2 0.10 % No
Timesteps = 10 2 0.10 % No
= 10 SDE 2 0.10 % No
10 SDE = 2 0.10 % No
SDE = gbm 2 0.10 % No
Monte Carlo simulation 2 0.10 % No
example pricing a 2 0.10 % No
T NTRIALS Simulations 2 0.10 % No
Timesteps Antithetic true 2 0.10 % No
NSTEPS Timesteps Antithetic 2 0.10 % No
Simulations NSTEPS Timesteps 2 0.10 % No
on the role 2 0.10 % No
NTRIALS Simulations NSTEPS 2 0.10 % No
pricing a European 2 0.10 % No
SDE 1 DeltaTime 2 0.10 % No
1 DeltaTime T 2 0.10 % No

SEO Keywords (Four Word)

Keyword Occurrence Density Possible Spam
GNU Octave financial package 6 0.30 % No
the GNU Octave financial 3 0.15 % No
in GNU Octave financial 3 0.15 % No
Compare with the exact 2 0.10 % No
Octave financial 050 released 2 0.10 % No
1 DeltaTime T NTRIALS 2 0.10 % No
DeltaTime T NTRIALS Simulations 2 0.10 % No
T NTRIALS Simulations NSTEPS 2 0.10 % No
NTRIALS Simulations NSTEPS Timesteps 2 0.10 % No
Simulations NSTEPS Timesteps Antithetic 2 0.10 % No
NSTEPS Timesteps Antithetic true 2 0.10 % No
= 10 SDE = 2 0.10 % No
10 SDE = gbm 2 0.10 % No
GNU Octave financial 050 2 0.10 % No
Timesteps = 10 SDE 2 0.10 % No
K Compare with the 2 0.10 % No
simulations in GNU Octave 2 0.10 % No
= exp r T 2 0.10 % No
exp r T mean 2 0.10 % No
r T mean max 2 0.10 % No

Internal links in - parsiad.ca

Selected publications
Selected publications - Parsiad Azimzadeh
Blog
Parsiad Azimzadeh
read about the latest release here
GNU Octave financial 0.5.0 released - Parsiad Azimzadeh
Monte Carlo simulation framework
Monte Carlo simulations in GNU Octave financial package - Parsiad Azimzadeh
An introduction to regular Markov chains
An introduction to regular Markov chains - Parsiad Azimzadeh
mlinterp: Fast arbitrary dimension linear interpolation in C++
mlinterp: Fast arbitrary dimension linear interpolation in C++ - Parsiad Azimzadeh
Optimal stopping III: a comparison principle
Optimal stopping III: a comparison principle - Parsiad Azimzadeh
Optimal stopping II: a dynamic programming equation
Optimal stopping II: a dynamic programming equation - Parsiad Azimzadeh
Optimal stopping I: a dynamic programming principle
Optimal stopping I: a dynamic programming principle - Parsiad Azimzadeh
Introductory group theory
Introductory group theory - Parsiad Azimzadeh
Closed-form expressions for perpetual and finite-maturity American binary options
Closed-form expressions for perpetual and finite-maturity American binary options - Parsiad Azimzadeh
Fast Fourier Transform with examples in GNU Octave/MATLAB
Fast Fourier Transform with examples in GNU Octave/MATLAB - Parsiad Azimzadeh
Welcome
Welcome - Parsiad Azimzadeh
Markov chains (1)
Parsiad Azimzadeh
Optimal stopping (3)
Parsiad Azimzadeh
GNU Octave (2)
Parsiad Azimzadeh
Notes (2)
Parsiad Azimzadeh
Mathematical finance (1)
Parsiad Azimzadeh
RSS
Parsiad Azimzadeh

Parsiad.ca Spined HTML


Parsiad Azimzadeh Parsiad Azimzadeh Selected publications Blog Menu Curriculum vitae Selected publications Blog Log in GNU Octave financial 0.5.0 released February 2, 2016 Parsiad Azimzadeh I am happy to signify the release of the GNU Octave financial package version 0.5.0. This is the first version to be released since I took on the role of maintainer. If you do not once have GNU Octave, you can grab a self-ruling reprinting here. To install the package, launch Octave and run the pursuit commands: pkg install -forge io pkg install -forge financial Perhaps the most heady wing in this version is the Monte Carlo simulation framework, which is significantly faster than its MATLAB counterpart. A unenduring tutorial (along with benchmarking information) are misogynist in a previous post. Other additions include Black-Scholes options and greeks valuation routines, unsaid volatility calculations, and unstipulated bug fixes. Some useful links are below: GNU Octave financial splash page GNU Octave financial documentation Changes in version 0.5.0 GNU Octave Monte Carlo simulations in GNU Octave financial package December 1, 2015 Parsiad Azimzadeh I have recently taken on the role of maintaining the GNU Octave financial package. I recently implemented stochastic differential equation simulation, which I discuss in this post. If you don't once have a reprinting of GNU Octave and the financial package, see this post for installation instructions. Consider the pursuit SDE: $$dX_t = F(t, X_t) dt + G(t, X_t) dW_t$$ where $W$ is a standard Brownian motion. With the Octave financial package, you can now simulate sample paths of this SDE. Let's take a moment to motivate why you might want to do this... A simple example: pricing a European undeniability A archetype problem in finance is that of pricing a European option, for which one needs to compute an expectation involving the random variable $X_T$ at some stock-still time $T>0$, referred to as the expiry time. For example, the Black-Scholes undeniability pricing problem is that of computing $$E\left[e^{-rT} (X_T-K)^+\right]$$ where $X$ follows a geometric Brownian motion (GBM): $$dX_t = (r-\delta) X_t dt + \sigma X_t dW_t.$$ Here, $r$ is the risk-free rate, $\delta$ is the dividend rate, and $\sigma$ is the volatility. Approximating such an expectation using a sample midpoint is referred to as Monte Carlo integration (a.k.a. Monte Carlo simulation). Though the Black-Scholes pricing problem happens to be one in which a closed-form solution is known, as an expository example, let's perform Monte Carlo integration to injudicious it using an SDE simulation: % Test parameters X_0 = 100.; K = 100.; r = 0.04; delta = 0.01; sigma = 0.2; T = 1.; Simulations = 1e6; Timesteps = 10; SDE = gbm (r - delta, sigma, "StartState", X_0); [Paths, ~, ~] = simByEuler (SDE, 1, "DeltaTime", T, "NTRIALS", Simulations, "NSTEPS", Timesteps, "Antithetic", true); % Monte Carlo price CallPrice_MC = exp (-r * T) * midpoint (max (Paths(end, 1, :) - K, 0.)); % Compare with the word-for-word wordplay (Black-Scholes formula): 9.3197 The gbm function is used to generate an object describing geometric Brownian motion (GBM). Under the hood, it invokes the sde constructor, which is capable of constructing more unstipulated SDEs. Timing The GNU Octave financial implementation uses dissemination to speed up computation. Here is a speed comparison of the whilom with the MATLAB Financial Toolbox, under a varying number of timesteps: Timesteps MATLAB Financial Toolbox (secs.) GNU Octave financial package (secs.) 16 0.543231 0.048691 32 1.053423 0.064110 64 2.167072 0.097092 128 4.191894 0.162552 256 8.361655 0.294098 512 16.609718 0.568558 1024 32.839757 1.136864 While both implementations scale more-or-less linearly, the GNU Octave financial package implementation profoundly outperforms its MATLAB counterpart. A multi-dimensional example: pricing a Basket undeniability Consider two assets, $X^1$ and $X^2$, and the basket undeniability option pricing problem $$E\left[e^{-rT}\left(\max\left(X^1_T,X^2_T\right)-K\right)^+\right]$$ where $$dX_t^i = (r-\delta^i) X^i_t dt + \sigma^i X^i_t dW^i_t \text{ for } i = 1,2$$ and the correlation between the Wiener processes is $dW^1_t dW^2_t = \rho dt$. Sample lawmaking for this example is below: % Test parameters X1_0 = 40.; X2_0 = 40.; K = 40.; r = 0.05; delta1 = 0.; delta2 = 0.; sigma1 = 0.5; sigma2 = 0.5; T = 0.25; rho = 0.3; Simulations = 1e5; Timesteps = 10; SDE = gbm ([r-delta1 0.; 0. r-delta2], [sigma1 0.; 0. sigma2], "StartState", [X1_0; X2_0], "Correlation", [1 rho; rho 1]); [Paths, ~, ~] = simulate (SDE, 1, "DeltaTime", T, "NTRIALS", Simulations, "NSTEPS", Timesteps, "Antithetic", true); Max_Xi_T = max (Paths(end, :, :)); BasketCallPrice_MC = exp (-r * T) * midpoint (max (Max_Xi_T - K, 0.)); % Compare with the word-for-word wordplay (Stulz 1982): 6.8477 GNU Octave Parsiad Azimzadeh AboutPhD (University of Waterloo), MMath (University of Waterloo), BSc (Simon Fraser University)Latest postsAn introduction to regular Markov chainsmlinterp: Fast wrong-headed dimension linear interpolation in C++Optimal stopping III: a comparison principleOptimal stopping II: a dynamic programming equationOptimal stopping I: a dynamic programming principleGNU Octave financial 0.5.0 releasedMonte Carlo simulations in GNU Octave financial packageIntroductory group theoryClosed-form expressions for perpetual and finite-maturity American binary optionsFast Fourier Transform with examples in GNU Octave/MATLABPagesHomeSelected publicationsWelcomeTagsMarkov villenage (1)Optimal stopping (3)GNU Octave (2)Notes (2)Mathematical finance (1) RSS | Design: HTML5 UP