TAYU Academy course material · Quant Risk Framework
Text walkthrough
VaR calculation methods
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 “VaR calculation methods” and explain it in your own words
2. Master this module's focus: VaR framework
3. Complete the assignment on your own and check it against the reference answer
VaR describes loss percentiles at a given confidence level and holding period, not the worst loss. The historical-based algorithm can significantly impact the results with small samples, and it must be clearly defined how to sort and round.
VaR (Value at Risk) represents the potential loss upper limit at a given confidence level and time horizon, such as a 1-day VaR of 2% at a 95% confidence level. Common calculation methods include historical simulation, parametric methods, and Monte Carlo simulation. VaR does not indicate how much more you would lose beyond the threshold.
Example: sorting the combination returns of the past 250 trading days, the 5th percentile is −1.8%, or a 95% one-day historical VaR is approximately 1.8%.
Convert returns to losses with a positive sign → sort ascending → take position ceil(p × n) for nearest-rank → state the sample size and holding period → run a separate tail stress test.
Loss ranking: -2, -1, 0, 1, 2, 3, 4, 5, 6, 10, and calculate the 90% VaR using nearest-rank.
ceil(0.9 × 1 10) = 9, the 9th term is 6. VaR6 does not mean a maximum loss of 6, nor is it sufficient with a sample size of 10 and an algorithm to prove tail stability.
20% losses 18%, 2%, 8%, nearest-rank 95% VaR = 2, worst 5% average = 8. If another realization uses percentile interpolation, it must be noted. For a normal model of daily yield mean 0, volatility 1%, 95% one-sided loss is approximately 1.645%, without gap fills.
ES from a small sample is unstable; real limits need independent professional review and should not adopt the course thresholds directly.
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. VaR must state its confidence level and horizon
2. VaR does not show how large tail losses can be
3. Cross-check with several methods
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.