TAYU Academy course material · Trading Data Analysis
Text walkthrough
Exporting MT data
A self-paced text walkthrough, without video or audio. See the article below for worked examples and materials.
Course Notes
1. Understand the core idea of “Exporting MT data” and explain it in your own words
2. Master this module's focus: Cleaning trading data
3. Complete the assignment on your own and check it against the reference answer
Platform export may include order, trade, or closed positions, with the meaning of the row preceding the metric. Partial trades, partial closings, and separate transaction fees can result in multiple rows per order, and should not be directly counted as transactions based on the number of rows.
Here are the steps for cleaning the trading records exported from the platform: deduplication, uniform time zone, complete the cost fields, and separate the records of opening positions from closing positions.
In the report exported from MT5, if the same order appears twice (partially filled), it should be merged by order number, and commissions and overnight interest should be included in the floating P/L.
Select the required report → Record the interval/time zone/currency → Keep the original file → Mark unique trades and orders → Analyze after de-identification.
One order is partially filled twice. What do counts by order ID and by deal ID each represent?
Order ID counts requests/orders, execution ID counts executions. They must be matched and handled separately according to predefined definitions, and fees must be processed separately.
The file trades-dirty.csv contains duplicate trades, invalid timestamps, and missing prices. Remove duplicates by unique trade ID and isolate invalid rows, providing the reason; do not delete loss rows as anomalies. Aggregate net profit/loss as gross profit + signed commission + signed overnight fee.
The same time does not mean a duplicate fill; de-duplicating by timestamp alone can delete legitimate partial fills.
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. Remove duplicates and unify time zones
2. All costs must be included
3. Merge records by order number
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.