Hello,
I am trying following -
- Calculate exponential regression for x number of days (125 and 250 days) - NOT SURE
- Calculate r squared value (Wiki details) - NOT SURE
- Then I will try to calculate based on these values the best portfolio to create - CAN BE HANDLED
- I would like to calculate the Exp regression * r squared for both 125 and 250 days - EASY TO HANDLE
- Finally find a ratio for this - 125/250d values - CAN BE HANDLED
- Now there are some other checks which are doable - CAN BE HANDLED
- Any direct functions I can use? I saw LSMA but not sure if it is the exponential regression from point 1 above.
- I know the calculations but currently no clue how to calculate this value hopefully with an inbuilt function. I found this function and also that Quantconnect supports it - link. But I am not able to exactly figure out who to do it.
- Can you confirm my question 1 if LSMA is same
- Can you help me calculate r squared value or point me to some example which can do this?