Hello,
i am trying to get 42 days price change for two assets using date.history - VTV and TIP
but prices at the close of the day are incorrect
the price of VTV for "2020-08-25 00:00:00 0000" is 106.392, and should be 107 (from Yahoo Finance)
2020-10-22 17:30 PRINT ('--rebalance date--: ', Timestamp('2020-10-22 10:30:00-0400', tz='US/Eastern'))
2020-10-22 17:30 PRINT ----
2020-10-22 17:30 PRINT ('calculate perfomance for ticker: ', Equity(25909 [VTV]), ' and period', 42)
2020-10-22 17:30 PRINT ('earliest price: ', 106.392, Timestamp('2020-08-25 00:00:00+0000', tz='UTC', offset='C'))
2020-10-22 17:30 PRINT ('curPrice: ', 107.0, Timestamp('2020-10-22 00:00:00+0000', tz='UTC', offset='C'))
2020-10-22 17:30 PRINT ('calculate perfomance for ticker: ', Equity(25801 [TIP]), ' and period', 42)
2020-10-22 17:30 PRINT ('earliest price: ', 125.839, Timestamp('2020-08-25 00:00:00+0000', tz='UTC', offset='C'))
2020-10-22 17:30 PRINT ('curPrice: ', 125.81, Timestamp('2020-10-22 00:00:00+0000', tz='UTC', offset='C'))
2020-10-22 17:30 PRINT ('absmomPerc :', 0.56822429906542438)
2020-10-22 17:30 PRINT ('cashPerc :', -0.023050631905251064)
I ask you to help with the algo, thanks