Hi there,
is the latest close price for USEquityPricing.close.latest actually the latest from the last day?
Is it also possible to get the latest from the current day?
I am using the following code:
def make_pipeline():
closeprice = USEquityPricing.close.latest
ret = DailyReturns()
filters=StaticSids([24])
return Pipeline(
columns={
'latest_close' : closeprice,
'return' : ret
}, screen=filters
)
mpipe = make_pipeline()
The output is:
latest_close return
2018-02-01 00:00:00+00:00 Equity(24 [AAPL]) 167.47 0.002934
2018-02-02 00:00:00+00:00 Equity(24 [AAPL]) 167.70 0.001373
2018-02-05 00:00:00+00:00 Equity(24 [AAPL]) 160.41 -0.043470
2018-02-06 00:00:00+00:00 Equity(24 [AAPL]) 156.49 -0.024437
2018-02-07 00:00:00+00:00 Equity(24 [AAPL]) 163.06 0.041984
2018-02-08 00:00:00+00:00 Equity(24 [AAPL]) 159.52 -0.021710
2018-02-09 00:00:00+00:00 Equity(24 [AAPL]) 154.53 -0.027332
2018-02-12 00:00:00+00:00 Equity(24 [AAPL]) 156.23 0.011001
2018-02-13 00:00:00+00:00 Equity(24 [AAPL]) 162.76 0.041797
Looking at Yahoo the close price of 156.23 on 2018-02-12 was more likely the close price from 2018-02-09.
How to I really get the latest price?
Thanks for your help!