stefan-jansen / machine-learning-for-trading

Code for Machine Learning for Algorithmic Trading, 2nd edition.
https://ml4trading.io
12.92k stars 4.12k forks source link

Typos and other Errata #88

Open casras111 opened 3 years ago

casras111 commented 3 years ago

From reading the book below what seem like typos:

In chapter 4 repeated passage image

In chapter 5 calculations of std and variance mixed:

chptr5_2 chprt5_1

stefan-jansen commented 3 years ago

Thank you! I'll keep this open in the hope that others will also contribute any errors they come across so I can fix them in the next edition.

drsxr commented 3 years ago

On algoseek_minute_data.ipynb Section 4 Nasdaq 100 constituents, the field date_time is incorrect and should be date_timebarstart errata1

stefan-jansen commented 3 years ago

@drsx the issue was a missing inplace=True when renaming the index to date_time, which I have fixed.

hxyue1 commented 2 years ago

Not sure if this is a typo or actually intended, but it looks like there are some inconsistencies in the TimeGAN notebook with regards to indexing for the supervisor inputs and outputs:

Screenshot from 2021-10-20 14-41-51

Screenshot from 2021-10-20 14-42-27

Screenshot from 2021-10-20 14-42-40

When training the supervisor, the mse calculation is mse(h[:, 1:, :], h_hat_supervised[:, :-1, :]), but the other two times it is mse(h[:, 1:, :], h_hat_supervised[:, 1:, :]). Is this intentional?

dama0418 commented 2 years ago

It looks like in the script: 08_ml4t_workflow/02_vectorized_backtest.ipynb the conditions (">") applied after .rank for selecting the best long_signals and short_signals must be inverted ("<=").

image

CDLim0906 commented 2 years ago

image

sample perhaps?