The VMarket applet is a pedagogical tool showing how the price
of financial derivatives can be calculated using a variety of different
methods. Tag modifiers define the default behaviour of an applet:
the selectors on the top of the applet switch between
different types of simulations and the parameters on
the right attribute specific values.
Press the Start / Stop button to execute the VMarket applet
until the value of the Time reaches the value RunTime or
Step 1 to take unit steps of a duration TimeStep.
Different functions are evolved (depending on the simulation) and are
displayed in the plot window; approximative measurements can be read
from the browser status bar after clicking in the plot window
and are also printed to the Java console.
Far more accuracy can be obtained by pressing the Print Console
button and by reading the numerical output from the
- i is the index labeling the discrete representation of the
- x[i] is the coordinate on the horizontal axis and can either
be a spot price S or a spot rate r.
In stock option calculations, x[i] measures the current market value
of the underlying share S and is also called spot price.
In credit market calculations, x[i] reprensents the current value of
the short term interest rate r and is also called the spot rate.
- f0[i] (curve in grey) has completely different meanings
depending on the simulation.
In stock option calculations, f0[i] simply reminds the terminal payoff
V(S) i.e. the value of the option on the expiry date.
In bond market calculations, f0[i] displays the forecast yield as a
function of time Y(t), this for a chosen value of the parameter
SpotRate. Rather than reading the horizontal axis with x[i] as
for the other curves, the time has to be computed manually using the
variable index and the rule t=i*RunTime/MeshPoints
- f[i] (curve in black) is the main result of the calculation and
displays the present value of the option, the discount function or the
- g[i] (curve in blue) is not always present.
In calculations involving barriers, g[i] shows the price of a vanilla
option without the barrier feature.
In bond market calculations, g[i] shows the yield that is simply
obtained from the discount function with g[i]=-log(f[i])/time.
The selectors appearing on the top of VMarket applet define
the type of problem. They are initialized with default values and
are later modified to fit the values specified in the
Careful, white spaces count!
- topic selects the type of the financial product.
"StckOption" (stock market options),
"ZeroCpBond" (discount function),
"BondOption" (bond market options),
"IRateSwap" (interest rate swaps),
"CreditModel" (credit market models),
"RandomWalk" (generic Brownian motion),
"Exercise" (programming assignments).
- method selects the numerical method.
"FinDifferen" (finite differences),
"FinElements" (finite elements),
"Monte-Carlo" (without displaying walkers),
"Monte-Carlo*" (with display of walkers),
"DistribFct" (distribution without walkers),
"DistribFct*" (distribution with walkers).
- scheme selects the flavour of a given product and method.
"European" (using financial variables),
"European logn" (using log-normal varables),
"American" (using financial variables),
"American logn" (using log-normal varables),
"inBarrier" (in-barrier option),
"outBarrier" (out-barrier option),
"particles" (generic random walker),
"Exercise 1.01" (all those that exist).
- ic selects the type of initial or terminal condition.
"VSpread" (vertical spread),
"SuperShr" (super share),
"Discount" (discount function),
The parameters appearing in a list on the right side of the VMarket
applet are initialized with default
values and are later modified to fit the values specified in the
They can be modified even later at run time by double-clicking the names.
Note that only the parameters specified in the list of Tag modifiers
(thought to be relevant) are listed. For a complete list at run-time, switch
the selector from Double click below to Show all parameters.
- RunTime the run time T [years], e.g. 0.25 for 3 months
- Drift the relative total drift of the underlying m [1/year], e.g. 0.05 for a 5% annual drift
- Volatility the relative volatility of the underlying s [1/year], e.g. 0.5 for a 50% annual volatility
- LogNkappa exponent k in the random walk, e.g. 1=log-normal, 0=normal, 0.5=between
- SpotRate the short term interest (risk free, spot) rate r [1/year], e.g. 0.03 for a 3% annual risk free rate
- Dividend continuous dividend yield D0 [1/years], e.g. 0.04 for a 4% continuous dividend payment
- StrikePrice the option exercise price at expiry K [currency], e.g. 10 for EUR 10
- MktPriceRsk market price of risk l, e.g. -0.5 for risk averse market
- MeanRevTarg target of mean reversion rate b, e.g. 0.05 for a 5% long term interest rate
- MeanRevVelo time scale of mean reversion process a, e.g. 2 for 1/2 year
- Shape0 shape parameter or amplitude, e.g. 1 for a Gaussian of unit height
- Shape1 shape parameter or position, e.g. 0 for a Gaussian centered on the origin
- Shape2 shape parameter or width, e.g. 1 for a Gaussian of unit width
- MeshLeft the lower end of the simulation range [currency or rate], e.g. 0 for an underlying share that can become worthless
- MeshLength the simulation range [currency or rate], e.g. 200 for an underlying share that may increase to 200 EUR during the RunTime
- MeshPoint the number of mesh points, e.g. 100 to calculate the price of a vanilla put option with an accuracy around 0.5%
- Walkers the number of random walkers, e.g. 1000 to calculate the price of a vanilla put option with an accuracy around 5%
- TimeStep the duration of one step [1/year], e.g. 0.00397 for one day, 0.01923 for one week
- TimeTheta the implicity parameter for time integration using FEM
- TuneQuad the tunable quadrature parameter using FEM
- UserInteger the user defined integer value
- UserDouble the user defined double value
HTML TAG modifiers format.
The VMarket applet is insearted in an HTML document via the
Tag window using a header of the form
<applet codebase="$user_dir/applet/" code=vmarket
align=center width=780 height=420>
<param name=topic value="Exercise">
<param name=scheme value="Exercise 4.07">
<param name=ic value="Put">
<param name=method value="FinDifferen">
<param name=RunTime value= 0.5>
<param name=Drift value= 0.1>
<param name=Volatility value= 0.4>
<param name=LogNkappa value= 1.>
<param name=SpotRate value= 0.1>
<param name=Dividend value= 0.>
<param name=StrikePrice value= 10.>
<param name=Barrier value= 0.>
<param name=MktPriceRsk value= 1.>
<param name=MeanRevTarg value= 0.05>
<param name=MeanRevVelo value= 0.1>
<param name=Shape0 value= 6.>
<param name=Shape1 value= 4.>
<param name=Shape2 value=-2.>
<param name=MeshLeft value= 0.>
<param name=MeshLength value= 20.>
<param name=MeshPoints value= 100>
<param name=Walkers value= 300>
<param name=TimeStep value= 0.00397>
<param name=TimeTheta value= 0.7>
<param name=TuneQuad value= 0.333>
<param name=UserInt value= 0>
<param name=UserDouble value= 0.>
The first two lines specify the path name on the server, the position and
the size of the window. The Tag modifiers that follow attribute the
values that will be set when the applet first appears in the web page.
These can always be recovered simply by refreshing the webpage.