Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 3/25/2005 Posts: 22
|
How do you correctly use the exp() function? I want to write a stop PCF. Let's suppose the stop is based on 0.3% return compounded per trading day on a stock purchased at the close 30 days ago. I think the PCF would be something like c30*(1.003exp(30)) but it is returning extremely high figures. What's wrong with the syntax?
|
|
Registered User Joined: 1/1/2005 Posts: 2,645
|
stanaction,
The function EXP is not the two place exponent function:
( x )exp( y ) = x^y
It is the single place exponential function:
EXP( y ) = 2.718...^y
Thus, the result you want is:
C30*1.003^30
or, equivalently:
C30*EXP(30*LOG(1.003))
as you please.
Thanks, Jim Murphy
|
|
Registered User Joined: 3/25/2005 Posts: 22
|
Thank you Jim, that's exactly what I needed. All is bright and clear now!
|
|
Guest-1 |