Hi, Shrewd!        Login  
Shrewd'm.com 
A merry & shrewd investing community
Best Of MI | Best Of | Favourites & Replies | All Boards | Post of the Week! | How To Invest
Search MI
Shrewd'm.com Merry shrewd investors
Best Of MI | Best Of | Favourites & Replies | All Boards | Post of the Week! | How To Invest
Search MI


Investment Strategies / Mechanical Investing
Unthreaded | Threaded | Whole Thread (40) |
Author: lohill HONORARY
SHREWD
  😊 😞

Number: of 5384 
Subject: Re: My new Program
Date: 01/24/26 2:09 PM
Post New | Post Reply | Report Post | Recommend It!
No. of Recommendations: 1
lizgdal,

1. For each stock, calculate the ratio of the current price to the highest price over the previous 251 market days.


I hate to be so dense but this whole calculation is not about a bunch of stocks. I am trying to do a calculation based on a single stock (SPY) on a single date. I can calculate PriceToHighPriceRatio for SPY on a given date and I can decide whether to give B a value of 0 or 1 but that gives me one B value. There is nothing for me to sum up unless I take the previous date and calculate a second B value based on that date and the high price on the previous 251 days. Then do that again for all 251 previous days thus ending up with 251 B values to sum up. Is that what Robbie is doing?

Larry
Post New | Post Reply | Report Post | Recommend It!
Print the post
Unthreaded | Threaded | Whole Thread (40) |


Announcements
Mechanical Investing FAQ
Contact Shrewd'm
Contact the developer of these message boards.

Best Of MI | Best Of | Favourites & Replies | All Boards | Followed Shrewds