18 ngày 5,640 XP · Lv 7PremiumTB
Library

Market Risk | Introduction To Financial Python on QuantConnect

Market Risk | Introduction To Financial Python on QuantConnect Pricing Data Community Algorithm Lab Documentation Sign In learning center articles / Introduction To Financial Python Market Risk 13/14 Author Jing Wu 2018-

Knowledge Hub · Research → Trading Insight

website · programming · quant · acie

# Market Risk | Introduction To Financial Python on QuantConnect > Source: https://www.quantconnect.com/learning/articles/introduction-to-financial-python/market-risk Market Risk | Introduction To Financial Python on QuantConnect Pricing Data Community Algorithm Lab Documentation Sign In learning center articles / Introduction To Financial Python Market Risk 13/14 Author Jing Wu 2018-06-13 Introduction In the financial literature, you may hear terms like the "beta" or "market risk" of an asset. This chapter will explain where these terms come from and how they can be useful. Capital Asset Pricing Model As we shall see later, the name "Asset Pricing" is a bit misleading because the CAPM tells us the expected return, rather than the price, of an asset. In the last chapter, we introduced the Capital Market Line (CML) shown in black: All investors should hold a portfolio on the CML, which is constructed by investing some fraction w of our wealth in the market portfolio and the remainder (1 − w ) in the riskless asset. So the return on a CML portfolio is If we let β = w, then the equation above becomes Notice that β is a measure of how sensitive our CML portfolio return is to the market return. Taking expectation on both sides results in the CAPM: Taking covariance on both sides instead yields Now apply two basic facts about covariance: where is constant Hence we obtain Computing beta in Practice While the Capital Asset Pricing Model is straightforward, applying it may not be. We first need to choose the timeframe for computing returns: should we use daily, weekly or monthly returns? Then we need to consider the number of data points available for linear regression. For example, if we compute beta using monthly returns in the past 1 year, then we only have 12 data points which is too few. Furthermore, the β of an asset can change over time. The following plot is the daily rolling beta of GE stock with a 6-month rolling windows: The β of GE ranged from 0.1 to 0.5 approximately. This is why you need to be careful when using β. It makes no sense to talk about β without a timeframe in mind. The following graph is the rolling p-value of beta. The p-value stays close to zero most of the time. However, during some period it suddenly increased close to 0.1, which corresponds to a 90% confidence interval. This might be caused by some mispricing or market turmoil. Market-Neutral A portfolio is market-neutral if its β is zero . In other words, the portfolio's returns are uncorrelated with market returns. We say that it has no "market risk". Some classical market-neutral strategies are pairs trading, beta-hedged equity portfolio and other derivatives strategies. We have daily returns of Dow 30 stocks from March 2012 to Jan 2015. For each stock, its β on any given day is computed using the past 6 months' returns. As this 6-month window moves forward in time, β will of course change. Once we know how each stock's β has changed over time, we can ask: which stocks' betas are correlated with each other? The table below shows the correlation between each stock's beta. How can we construct a market-neutral portfolio? Consider two stocks A and B: Let's allocate w on stock A and (1 − w ) on stock B, then market neutrality means As mentioned earlier, and will change with time, so will in a market-neutral portfolio. However we can achieve market neutrality with constant so long as and have a linear relationship: Then eliminate to get If c &approx 0 then w is roughly constant: Note: If c is signficant, then we need 3 stocks to get zero net beta. Usually 2 stocks are sufficient to cancel out most of the market risk. Example The 6-month rolling betas of PG and KO stocks have a correlation of 93%. The linear relationship between their betas is Therefore the market neutral weights are We tested this portfolio both in-sample (March 2012 to Jan 2015) and out-of-sample. It achieved a beta of 0.01 and -0.004 respectively. See the backtest below. Summary This chapter has explained what market risk means in the context of CAPM, and how market risk can be reduced. In the next chapter we will generalize CAPM to multi-factor models, such as the Fama-French models. Algorithm Try the world leading quantitative analysis platform today Sign Up Previous: Modern Portfolio Theory Next: Fama-French Multi-factor Models ON THIS PAGE Introduction Capital Asset Pricing Model Computing beta in Practice Market-Neutral Summary Algorithm Share Try the world leading quantitative analysis platform today Sign Up QuantConnect™ 2022. All Rights Reserved TECHNOLOGY Algorithm Lab Documentation Community Tutorials Data Library Learning Articles System Status COMPANY About Affiliates Our Blog Contact Pricing Integration Partners Terms & Conditions Privacy Policy
Market Risk | Introduction To Financial Python on QuantConnect Source: Market Risk | Introduction To Financial Python on QuantConnect Pricing Data Community Algorithm Lab Documentation Sign In learning center articles / Introduction To Financial Python Market Risk 13/14 Author Jing Wu 2018-06-13 Introduction In the financial literature, you may hear terms like the "beta" or "market risk" of an asset. This chapter will explain where these terms come from and how they can be useful. Capital Asset Pricing Model As we shall see later, the name "Asset Pricing" is a bit misleading because the CAPM tells us the expected return, rather than the price, of an asset. In the last chapter, we introduced the Capital Market Line (CML) shown in black: All investors should hold a portfolio on the CML, which is constructed by investing some fraction w of our wealth in the market portfolio and the remainde… Ứng dụng: nối nghiên cứu với programming, USD, lãi suất và risk regime — đưa vào journal và playbook. DOI/OA chỉ là rail tham chiếu; nội dung chính là summary, takeaways và ứng dụng thị trường.

1. Market Risk | Introduction To Financial Python on QuantConnect Source: Market Risk | Introduction To Financial Python on QuantConnect Pricing Data Community Algorithm Lab Documentation Sign In learning center articles / Introduction To Financial Python Market Risk 13/14 Author Jing Wu 2018-06-13 Introduction In the financial literature, you may hear terms like the "beta" or "market risk" of an asset.

2. This chapter will explain where these terms come from and how they can be useful.

3. Capital Asset Pricing Model As we shall see later, the name "Asset Pricing" is a bit misleading because the CAPM tells us the expected return, rather than the price, of an asset.

4. In the last chapter, we introduced the Capital Market Line (CML) shown in black: All investors should hold a portfolio on the CML, which is constructed by investing some fraction w of our wealth in the market portfolio and the remainder (1 − w ) in the riskless asset.

5. So the return on a CML portfolio is If we let β = w, then the equation above becomes Notice that β is a measure of how sensitive our CML portfolio return is to the mark

Các kỹ thuật ML/quantitative trong tài liệu hữu ích để tư duy feature & regime, nhưng không thay risk rules: luôn gắn signal với position sizing và news filter.

Góc Forex: đối chiếu kết luận bài với hành giá gần nhất và lịch tin impact cao trước khi vào lệnh.

Góc Gold (XAUUSD): đối chiếu kết luận bài với hành giá gần nhất và lịch tin impact cao trước khi vào lệnh.

  • Trading: rút 1 bias hoặc 1 setup hypothesis từ Key Takeaways, test trên demo/journal trước khi live.
  • Risk: chuyển insight thành rule (max risk/trade, pause quanh tin, correlation USD–vàng) và gắn vào playbook.
  • Journal: mỗi tuần ghi 1 đoạn “theory → market observation → outcome” dựa trên bài này.
  • Portfolio: nếu bài nói macro/liquidity, đánh dấu exposure risk-on/off và hedge (ví dụ XAU) tương ứng.
  • Prop Firm: dùng checklist từ bài để giảm overtrading và giữ consistency theo rule firm.
AI Search