Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Recursion with foxpro
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01086981
Message ID:
01087428
Views:
34
Marcia is a good source for recursive functions. She has a sense for that stuff. She said there was a 64K nesting limitation.

I shun recursion because it is difficult [for me] to read, debug and optimize. But to Marcia that stuff is simple!

An annuity calculation? What are you calculating? Are you accruing returns, computing a yield or marking to market?

This stuff can be done efficiently with VFP. It is importantant to use fast efficient stores. Sometimes Fabozzi does not transpose "directly" to a VFP command window. Sometimes it is helpful to use a collection or cursor as a "store" store for "intermediate" factors rather than leave them to memory.

A LISP OCX would be nice sometimes.

There is an MVCOUNT in CONFIG.FPW that allocates the number of variables VFP can work with. I have set it higher for "yield" engines.

If you have time could you share a lay description or (at least) the "industry" name for what you are doing. It looks interesting. It looks like a rate of return or a price function. Been a while.

>Hi all,
>
>Is it possible to do recursion in foxpro? If so how would I set the following
>equations with recursion functions:
>
>aa(x,n) = 0.5 + 1/1.03*Px[state,state]*aa(x+1,n-1)
>+ 1/1.03*Px[state,state]*ia(x+1,n-1,1)
>
>ia(x,n,inv) = 0.5 + 1/1.03*Px[state,state]*aa(x+1,n-1)
>+ 1/1.03*Px[state,state]*ia(x+1,n-1,inv+1)
>
>where aa(x,0) = 0 and ia(x,0,inv) = 0 and ia(x,n,inv) = 0 for inv > 6 and Px is a given matrix.
Imagination is more important than knowledge
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform