googledatalab / notebooks

Google Cloud Datalab samples and documentation
Apache License 2.0
341 stars 162 forks source link

Machine Learning with Financial Data - unstable results #108

Open skyjiao opened 7 years ago

skyjiao commented 7 years ago

Hi, I was trying out the "Machine Learning with Financial Data" notebook. In the tutorial video, the prediction accuracy of the first trivial model is 65% (as is described in the notebook's text), however, the current version of the notebook on github showed an accuracy of 90% and when I ran the notebook myself both on my PC and on Google Cloud, I got 84%. I'm wondering what is going on here. Can anyone explain that to me? Thanks, Yang

mormond commented 6 years ago

I think there's a flaw in the EDA calculation of the logged returns. closing_data is being shifted but it's not in date order so the result is not ln(Vt/Vt-1). ie it is not comparing the close on day x with the close on day x-1.