MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Newbie question

  • To: mathgroup at smc.vnet.net
  • Subject: [mg54197] Re: Newbie question
  • From: Peter Pein <petsie at arcor.de>
  • Date: Sun, 13 Feb 2005 00:21:28 -0500 (EST)
  • References: <cukb9l$lns$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

> I use the Mathematica package below. The function that I call is 
> HestonVanilla. This function has 13 arguments that I need to provide. I want 
> to change the programm, so that I do not have to give "lambda", "rf", "cp" 
> and "G" each time I use the function. Instead I want that these arguments 
> are always set to specific values, namely:
> 
> lambda = 0
> rf =0
> cp = 1
> G = 0
> 
> The reason for that is that, when I call the function from Excel I can only 
> have 9 arguments.
> I guess this is a piece of cake for someone familar with Mathematica.
> 
> It would be great if someone could help me with that, since I need it 
> urgently for my diploma thesis. Thank you!
> 
> 
> 
> 
> BeginPackage["Options`HestonVanilla`"]
> 
> (************************************************************************************
> author: Uwe Wystup, wystup at mathfinance.de
> date  : November 1999
> *************************************************************************************)
> AuxFunc::usage = "computing the ingredients for HestonVanilla"
> HestonVanilla::usage = "Steven Heston's Stochastic Volatility Model\n
> to price European put and call options\n
> HestonVanilla[k,o,sigma,rho,lambda,r,rf,v,S,K,tau,cp,G]\n
<snip>

I'm afraid you have to rearrange the arguments and to give the default 
values in this way:

HestonVanilla[k_, o_, sigma_, rho_, r_, v_, S_, K_, tau_, lambda_:0, 
rf_:0, cp_:1, G_:0]

Maybe someone knows an easyer way to do this...

Have sucess,
Peter
-- 
Peter Pein
Berlin


  • Prev by Date: Re: Importing binary file is toooooo slow...
  • Next by Date: Re: upgraded to Fedora Core 3
  • Previous by thread: Re: Newbie question
  • Next by thread: Re: Newbie question