TAYU Academy course material · Python Quant Trading Lab
Course Notes
1. Understand the core idea of “First complete strategy” and explain it in your own words
2. Master this module's focus: Research engine and interface boundary
3. Complete the assignment on your own and check it against the reference answer
A complete strategy is linked by data, features, signals, size, execution, costs, and reporting. Each step should trace back to the input, and none of the steps should be skipped to still be called end-to-end.
From research to execution, layers need to be defined: data adapter, signal, risk control, and execution. Data is passed between these layers through clear interfaces. This course only conducts offline research and does not connect to real accounts; any automated trading requires additional risk control approval and simulation validation.
Example: The signal module outputs "EURUSD target position 0.2 lot", and the risk control module checks the total exposure and daily loss limit before passing it to the execution module; in this lesson, the execution module only logs and does not place orders.
Freeze CSV and parameters → extract SMA → take signals from closed positions → adjust for the next open → track fees and cash balance → final valuation at the end → write report.
Draw a seven-step flowchart, marking the timestamps for each step; explain why keeping the training labels and signals in the same table still requires leakage prevention.
The process should first feature, then signals, and finally future execution; future labels must be clearly isolated within the same table and only read during evaluation. The existence of a column does not imply its availability at the time.
Local engine reads the same synthetic CSV file, first generating past window features, then lagging the signal by one period for studying yield in the next timeframe. It also adds cost calculation based on turnover, outputting the equity before and after costs and drawdown. Changing the terminal to a simulated matching engine should not alter the feature calculation.
Keys should not be outputted in the browser or notebook; successful offline does not prove a real platform connection or successful trades.
The script covers data cleaning, a traceable next-open simulation, and equity and risk arithmetic. It is not a production trading engine; the hand calculations and report tasks for this lesson still have to be done independently.
python research_lab.py --self-test
python research_lab.py --output academy-results1. Separate research, risk control and execution
2. Clear interfaces make testing easier
3. This lesson does not connect to a real account
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.
Key Takeaways
Completion records your own study, not verified competence. Exercises use fictional data; no real account or deposit is required.