TAYU Academy course material · Machine Learning for Trading
Course Notes
1. Understand the core idea of “LSTM experiment report” and explain it in your own words
2. Master this module's focus: LSTM experiment
3. Complete the assignment on your own and check it against the reference answer
LSTM reports aim to reproduce the shapes, causal splits, and training procedures. A decline in loss does not prove generalization, and fixed synthetic data performance cannot be extrapolated to the market.
LSTM is suitable for handling sequential data, with an input shape generally of (number of samples, time steps, feature number). Financial data is noisy and has a small number of samples, making deep models prone to overfitting. It should be compared with simple baseline models (such as logistic regression or random guessing).
For example, if the out-of-sample performance of a 30-step LSTM trained with 5 features does not outperform logistic regression, there is no reason to adopt a more complex model.
Run `lstm_lab.py` → Save seed/version/shapes/number of epochs → Kernel test with 48-window → Compare baseline → Write limitations and items not run.
Submit the report, including 139×20×3, hidden8, 8 rounds, and 48 testing windows; if PyTorch is not installed, how should it be filled?
Fill in the dependency failure or non-execution and the reason, do not copy the reference score to claim it as your own result. Running successfully only proves the execution flow of the experiment, not the actual price prediction or the readiness of the production model.
Assuming 32 samples, each with 20 steps, and 3 features per step, the shape is (32, 20, 3); hidden dimension is 8, and a single-layer output is (32, 20, 8), resulting in (32, 8) for the final moment, followed by a classification head outputting 32 logits. Labels cannot mimic future directions within a window by pretending to be the last known direction.
A good fit on a synthetic series is not price-forecasting ability; never use final test results to choose network size.
Install the dependencies listed for this lab in the README first. If a dependency or platform is unavailable, mark the lab as not run; downloading the source is not evidence of running it.
python lstm_lab.py1. Mind the input shape
2. Compare against a simple baseline model
3. More complex is not better
Risk warning: leveraged trading in forex, precious metals and similar products carries a high level of risk and you may lose all of your capital, or more. This course is for education only. It is not investment advice and does not promise any return. Example prices and contract specifications are teaching assumptions; always use what your own platform discloses. Past performance and backtests do not indicate future results.
All values, prices, accounts and cases in this course are teaching assumptions; the fixed materials can be reproduced offline. Marking a lesson complete only records your study. It is not a certification, a service approval or a promise of returns. Workbooks and answer files are currently provided in Chinese.
LSTM reports aim to reproduce the shapes, causal splits, and training procedures. A decline in loss does not prove generalization, and fixed synthetic data performance cannot be extrapolated to the market.
Record your work and compare the reference result. Self-checks are not verified competence.
Completion records your own study, not verified competence. Exercises use fictional data; no real account or deposit is required.