Jumping in from a finance perspective... You really don't want to actually use nested lists for this -- the overhead and index-book-keeping will quickly become quite annoying.
Instead use a 2D array (I assume you're using the CRR Binomial Tree model for an American Option) where the column number less one is how many steps into the tree you are and the row is how many ups/downs you've had (your call which one) -- then just roll your option valuing formula with loops over the array. This is implemented in the fOptions package in the CRRBinomialTree function, but if you can't use real R that might/might not help you. It is open source however... Michael On Tue, May 22, 2012 at 6:22 AM, jackl <jacks...@hotmail.de> wrote: > Hi there, > > ~ the 'problem' or rather the task I'm trying to solve is to implement > an algorithm to compute the ask/bid price of american options in a > close to R related program language. > > because i'm not really using R but just it's basic functionalities I cannot > rely on different packages included in the R space. > > is it usual for R to compute nested functions with such a workload? > > Best thanks > > -- > View this message in context: > http://r.789695.n4.nabble.com/as-function-parameters-tp4620390p4630858.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.