TAYU Academy course material · Quant Risk Framework
Course Notes
1. Understand the core idea of “VaR calculation exercise” 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
The VaR practical should validate monotonicity, sign, and boundary of small samples. A code returning a number does not imply meaningful input; data absence, non-finite values, and invalid confidence levels should be rejected.
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%.
Run self-check → manually calculate 10 sample cases → recalculate with 95% → test empty array/NaN → output algorithm and errors, do not swallow exceptions.
Find the 95% nearest-rank Value at Risk for 10 equally likely losses; how to handle a confidence level of 1.2 and an empty sample?
ceil(9.5)=10, VaR10; exceeding 1.2 is clearly flagged with an error or is not computable, and does not return 0. Differences in values are due to characteristics of the sample or algorithm, not something to alter to hide expectations.
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.
The VaR practical should validate monotonicity, sign, and boundary of small samples. A code returning a number does not imply meaningful input; data absence, non-finite values, and invalid confidence levels should be rejected.
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.