Registered User Joined: 12/7/2004 Posts: 331
|
Hello,
I want to write a pcf that shows the largest drawdown as a % between the days of 100 days ago and 40 days ago.
Said in a different way…I want to find the largest drawdown from the Opening Price 100 days ago (O100) to the Lowest Price 60 Days Thereafter (i.e. 40 Days Ago from Today, which is MinL40?)
And I would like to be able to show this value as: 1. A % of the Opening Price 100 Days ago, and as 2. A $ value from Opening Price 100 days ago.
‘Am not quite sure where to begin with this…hopefully I’ve asked the question in a way that begs some assistance.
Thanks for any help you can provide.
TC
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
QUOTE (cleven) A % of the Opening Price 100 Days ago If I'm understanding your request correctly, the following should work (the result is a Price Percent Change and should be negative unless the price was always above the Opening Price 100 days ago):
100 * O100 / MINL60.40 - 100
QUOTE (cleven) A $ value from Opening Price 100 days ago. If that works, the following will probably be correct as well (although you will have to reverse it if you want a negative value):
O100 - MINL60.40
You may wish to review the following:
How to create a Personal Criteria Forumula (PCF) Handy PCF example formulas to help you learn the syntax of PCFs! Personal Criteria Language Function List
-Bruce Personal Criteria Formulas TC2000 Support Articles
|