TAYU Academy course material · Portfolio Strategies & Risk
Text walkthrough
Portfolio VaR and ES
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 “Portfolio VaR and ES” and explain it in your own words
2. Master this module's focus: Portfolio-level risk control
3. Complete the assignment on your own and check it against the reference answer
Combining VaR with ES should be based on joint portfolio losses rather than the simple addition of individual numbers. The confidence level, holding period, sign of losses, and tail algorithm must be consistent.
At portfolio level, set a total risk budget, exposure limits per instrument or currency, a maximum portfolio drawdown kill switch, and rules for retiring a strategy that stops working.
Combination drawdown reaches 8%, half the risk is applied to all strategies; if a strategy consistently falls below the expected threshold for three consecutive months, the strategy is paused.
First, weight each period sequentially and combine them → turn the return from loss to gain → sort → use clear quantiles to calculate VaR → use the tail specified in the agreement to calculate ES → list the sample restrictions.
On the same day, if A incurred a loss of 100 and B made a profit of 80, what would the combined loss be? Could the worst loss of each, 100 for A and 120 for B, be directly considered as a combined loss of 220 for that day?
The daily loss is 20; the worst day may not occur simultaneously, simply adding them is another extreme scenario, not a joint Value at Risk (VaR) of historical data. Independent testing of simultaneous loss pressure should still be conducted.
Teaching with 20 equal-weight loss samples, where 18 are 0 and the other 2 and 8. The 19th sample from the nearest-rank 95th percentile gives a VaR of 2; if ES is defined as the mean of the worst 5%, then only 8 is taken for an ES of 8. Different boundary methods must be disclosed, and 2 cannot be written as the maximum loss of 2.
Continuous quantile interpolation can give different VaR values; compare the algorithms before deciding the code is wrong.
This dependency-free script contains small labs for rank correlation, time folds, inventory valuation, covariance risk and rejection paths. The grid part only models buy-on-the-way-down inventory, with no sell-side recycling or real fills; the risk-parity part only demonstrates a given covariance and is not a general optimiser. Work from the report, and do not treat a small lab as a complete production strategy.
python strategy_labs.py1. Set a portfolio-level risk budget
2. Limit concentrated exposure
3. Set rules for retiring a strategy
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.