Video yükleniyor...

Video Yüklenemedi

Ana Sayfaya Dön

➡️ Quantitative Finance from Scratch, part 44: Arbitrage Pricing Theory (APT). Stephen Ross published it in 1976 as an alternative to the CAPM. The CAPM explains expected returns with one risk, the market. The APT allows several risks, called factors, for example surprises in economic growth, inflation or interest...

49,200 görüntüleme • 3 gün önce •via TikTok

0 Yorum

Yorum bulunmuyor

Orijinal gönderinin yorumları burada görünecek

Benzer Videolar

➡️ Part 27 of Quantitative Finance From Scratch: the Fama-French three factor model. The market beta alone (parts 14 and 15) explains stock returns only in part, so Fama and French added two more factors, size (part 26) and value (part 25). They introduced the model in 1993 in the Journal of Financial Economics ("Common risk factors in the returns on stocks and bonds"). A factor is the return of one portfolio minus another: small minus big (SMB) and high minus low (HML, cheap minus expensive). In the regression, a stock's return above the risk-free rate equals alpha, plus a beta times each factor's return, plus an error term for the stock's own swings. Alpha is what the three factors cannot explain. In our simulation (nine portfolios, three simulated factors, 50 years of monthly returns, assumed numbers, true alpha zero), the market alone leaves the small value portfolio with an alpha of 7.9 % a year and explains only 46 % of its ups and downs. With all three factors, its alpha drops to -0.9 % a year, close to the built-in zero, the model explains 90 %, and the regression finds betas of 1.00, 1.00 and 0.96. The structure is built into the model, so it shows how the method works and makes no claim about real markets. In real data, the three factors explain much of the differences in average returns, though not all: in their 1996 tests, the continuation of short-term returns (momentum) stayed unexplained, and Fama and French later added two more factors. Eugene Fama shared the 2013 Nobel Memorial Prize in Economic Sciences with Lars Peter Hansen and Robert Shiller "for their empirical analysis of asset prices". Education only, not financial advice. #quantfinance #famafrench #factorinvesting #python #finance

QuantFinanceToGo

19,300 görüntüleme • 24 gün önce

➡️ Quantitative Finance from Scratch, part 45: Statistical Arbitrage. The arbitrage from the last part was a profit without any risk. Statistical arbitrage is the practical version: many small bets that can each lose, but win on average. One of the best known and simplest forms is pairs trading: two stocks in the same business that move together. The gap between them, the spread = P_A − β · P_B (P_A price of stock A, P_B price of stock B, β the hedge ratio), keeps coming back to its average. That is the edge: the trade treats this return almost like a law, so the further the spread moves away, the more it should come back, and that way back is the profit. The rule: z = (spread − average) / standard deviation. When z reaches +2 or −2, you sell the expensive stock, buy the cheap one, and close both when the gap is back at its average. Because one stock is long and the other short, a move of the whole market mostly cancels out. News about one company can still hit a single pair, so funds make many such trades at once, and the surprises average out. The big risks: the link between two stocks can break for good, for example after a merger, and when many funds hold the same trades, they can all lose at once. The code (statarb_reel.py, 16 lines of plain Python without packages) is general on purpose: the spread from two prices and the hedge ratio, the z score, and the signal that sells the expensive stock and buys the cheap one at two standard deviations and closes at the average. If you want to go deeper, the link to my website is in my bio. #quantfinance #statisticalarbitrage #pairstrading #meanreversion #python Education only, not financial advice.

QuantFinanceToGo

37,000 görüntüleme • 2 gün önce

➡️ Quantitative Finance from scratch part 12 closes season 1. Every part was one step in a single story about a bet with an edge, and every number below comes from that part's own run. Part 1, expected value: a $1 bet on red wins 18 times out of 37, so it loses 2.7 cents on average, and over a million bets the casino made $27,288. Part 2, the random walk: coin flips add up to something that looks like a stock chart, and the same edge becomes a drift of 2.7 cents per step. Part 3, the square root rule: after 100 random steps the typical distance is about 10, because randomness grows with the square root of time. Part 4, the bell curve: many small random steps build it, with 68 % of results within one standard deviation. Part 5, returns: percent moves multiply, so after -50 % you need +100 % to get back. Part 6, present value: at 5 % interest, $100 paid in ten years is worth $61.39 today. Part 7, volatility: two investments with the same average swing about 4 % and 32 % a year. Part 8, the Sharpe ratio (William F. Sharpe, 1966): extra return per unit of risk, 0.36 for the wild investment and 0.99 for the calm one. Part 9, volatility drag: +50 % and then -50 % leaves you 25 % down. Part 10, correlation: the less two assets move together, the less a 50/50 mix swings, from 19 % down to 10 %. Part 11, diversification: ten assets cut the risk from 20 % to 12.2 %, above a floor of 11 % that the shared market sets (Markowitz, "Portfolio Selection", Journal of Finance, 1952). The big picture: how big the edge is, how much it swings, and how much of that swing you can spread away. Season 2 brings portfolios, bets and evidence. This video is for education only, and nothing in it is financial advice. #quantfinance #finance #riskmanagement #portfolio #probability

QuantFinanceToGo

109,700 görüntüleme • 1 ay önce

In 1991 a Stanford professor turned $120,000 into $7 million off two stocks that went nowhere, using nothing but their swings. Nobody on Wall Street wanted this getting out, and the math sat buried for 35 years. His name was Tom Cover, and in information theory he was royalty, he wrote the textbook the whole field still learns from. Then he did something no one asked for. He pointed Claude Shannon's math at the stock market. He took two forgettable stocks. On their own, over 20 years, one rose 4x and the other 8x, nothing special. But they jumped around hard, and out of sync. So he rebalanced them daily: trim the one that popped, add to the one that dropped. That pair returned over 70x. The gain never came from the companies. It came from the shaking. The rule behind it is one line: W* = max E[log bᵀX] Maximize the expected log of your wealth, not the average return. Average return says dump everything into the top stock. Log says spread and rebalance, because compounding runs on the geometric mean, and volatility becomes fuel instead of risk. Then Cover went further. He built a portfolio that keeps pace with the best rebalancing you could have picked with a year of hindsight, no forecasts, no model. It held through the crashes of 1929 and 1987. And the same constant that runs it shows up in file compression. To Cover, beating the market and zipping a song were the same problem. He never found a better stock. He found the money hiding in the fact that stocks move at all. Watch this 57-min lecture, the answer is in this video. Worth watching right now.

MindArch

62,900 görüntüleme • 2 ay önce

➡️ Quantitative Finance from Scratch, part 47: What does a market maker actually do? A market maker is a trading firm that always provides two prices for a stock: the ask (higher, what you pay when you buy) and the bid (lower, what you get when you sell). When you trade as a retail investor, the other side is usually a market maker. It stands in the middle, so someone is always there to trade with you. This is called providing liquidity. In return, it earns the spread (spread = ask − bid). Buy at 99.98 dollars, sell at 100.02 dollars, and it earns four cents per share. That sounds tiny, but it repeats all day across many stocks. The job comes with two big risks. Inventory: when many people sell at once, the market maker ends up holding a lot of stock, and if the price then falls, it loses money (P&L = cash + inventory × fair price). Informed traders: someone who hears news first sells to the market maker right before the price drops. A good market maker adjusts its two prices all day, moving them with its inventory and widening the gap when the risk grows. On many exchanges, official market makers promise to quote within a maximum spread and pay lower fees in return. The code (mm_reel.py, 16 lines of plain Python without packages) is general on purpose: two quotes around a mid price, what happens when a customer buys or sells, the profit and loss, and a quote shifted with the inventory. If you want to go deeper, check out the full course I built: quantfinancetogo.com #quantfinance #marketmaking #marketmaker #finance #python Education only, not financial advice.

QuantFinanceToGo

10,200 görüntüleme • 8 saat önce

these 10 github repos are the most DANGEROUS quant stack on the internet Quant funds spend millions on data terminals, research desks and execution engines, these 10 repos cover every piece of it for free That's 329k+ stars of code that hedge funds would rather you never put together Here's every repo and what it does: 1. OpenBB (75k stars): an open data platform for analysts, quants and AI agents, prices, options chains, macro and fundamentals from one place 2. TradingAgents (118k stars): a multi-agent framework that mirrors the dynamics of real-world trading firms, AI analysts write reports, bull and bear researchers debate, a trader decides and a risk team signs off 3. qlib (50k stars): Microsoft's AI-oriented quant investment platform, from exploring ideas to production 4. RD-Agent (15k stars): Microsoft's AI researcher that proposes factors, writes the code and backtests them, in their NeurIPS 2025 paper it hit up to 2x higher annualized returns than classical factor libraries in backtests, with 70% fewer factors 5. gs-quant (14k stars): the quant toolkit created and maintained by Goldman Sachs' own quants, pricing, risk and timeseries math 6. nautilus_trader (31k stars): a production-grade, Rust-native trading engine with a deterministic, event-driven architecture 7. Chronos (6k stars): Amazon's pretrained models for time series forecasting, zero-shot, so they forecast data they were never trained on 8. QuantLib (8k stars): the free, open source library for quantitative finance, modeling, trading and risk management in real life, from options to bonds and swaps 9. skfolio (3k stars): portfolio optimization, factor models and risk management built on scikit-learn 10. vectorbt (10k stars): runs thousands of trading ideas before others finish one Here's how they work together: Data: OpenBB feeds the whole stack the same prices, options and macro data Forecast: Chronos predicts where every series is likely to go next Alpha: RD-Agent mines new factors inside qlib, so research runs on its own Decisions: TradingAgents turns forecasts and factors into trades, with a risk team that has to sign off Risk: QuantLib prices the options, gs-quant runs Goldman's risk math on everything Portfolio: skfolio sizes the positions so no single bet can sink you Testing: vectorbt stress-tests every version of the strategy, fees included Execution: nautilus_trader runs it, paper first, always Here's how you can run it for free yourself: 1. Open Claude Code and clone all 10 repos 2. Have Claude pull 5 years of S&P 500 prices, options and macro data with OpenBB 3. Run Chronos on every stock to forecast the next 20 days 4. Let RD-Agent mine new factors in qlib on the same data 5. Feed the forecasts and factors to TradingAgents and keep only the trades its risk team approves 6. Price the options legs with QuantLib and run gs-quant's risk math: volatility, drawdown, beta 7. Build the portfolio in skfolio with a max drawdown limit 8. Backtest 10,000 versions of the strategy in vectorbt and keep the ones that survive fees 9. Paper trade the winner in nautilus_trader for 2 weeks, if it doesn't beat buy-and-hold, you don't have an edge yet i won't say anything more:

Сarm1ne

37,954 görüntüleme • 13 gün önce

➡️ Quantitative Finance from Scratch, part 35: how market makers make money. The first source is the spread. Like an exchange booth, a market maker buys a little below the fair price at the bid and sells a little above it at the ask, so every trade earns half the gap whatever the stock does next. After selling a call, it buys delta shares, so small moves no longer matter. The second source comes from the other Greeks: theta is the income, because the call it owes loses value every day, and gamma is the cost, because after every big move it must buy shares high and sell them low to keep the hedge. If the stock moves exactly as much as the implied volatility in the price, income and cost cancel. If it stays calmer, the market maker earns, and if it moves more, it loses. Vega is the risk to this income, because a jump in implied volatility makes the call it owes more expensive. If a customer sells it the call instead, everything flips. The code (marketmaker.py, 16 lines) sells our call from part 33 at the ask (fair $10.45, ask $10.55, bid $10.35) and hedges it every day on 2,000 simulated years with an implied volatility of 20 %. With a real volatility of 16 % it earns $1.59 per call on average and every path ends in profit; at 20 % it earns $0.10, about the spread; at 24 % it loses $1.41 and only 0.3 % of paths end in profit. Honest notes: a simplified model with one option, daily hedging, Black Scholes prices, constant volatility, no trading costs, no dividends and no other customers. Real market makers manage many options at once and also face fees, inventory limits and jumps. #quantfinance #options #marketmaking #greeks #finance

QuantFinanceToGo

93,300 görüntüleme • 13 gün önce

Bridgewater doesn't have 500 positions they have 5 exposures that explain 78% of everything those 500 positions do this video shows what that looks like in 3D PCA Risk-Mode Trajectory. three axes: PC1, PC2, PC3 each one is a principal component extracted from the return matrix of the entire market PC1 is broad market direction. it alone explains roughly 40% of all stock movement PC2 separates growth from value. another 15% PC3 captures rate sensitivity. another 10% three invisible forces. 65% of the variance in every stock you've ever traded the dot moving through that 3D space is where the market is right now when the dot drifts toward a corner, the market is concentrating into one regime when it sits in the center, forces are balanced and directional trades are noise quant desks don't watch that dot for fun. they use its position to size every trade in the book if PC1 is dominating, stock picking is pointless because everything moves together if PC2 is leading, the value vs growth rotation is the only trade that matters if PC3 spikes, interest rate sensitivity is driving everything and your "stock pick" is really a rate bet you didn't know you made > PCA: Karl Pearson, 1901 > used at Bridgewater, AQR, Two Sigma for factor decomposition since the 1990s > this visualization: free, public, 29 seconds > scipy builds PCA in 3 lines of Python retail analyzes 500 tickers and thinks they're making 500 decisions quant desks decompose the same 500 into 5 forces and make 5 decisions one is complexity. the other is the math that simplifies it full breakdown in the video below

delost

49,400 görüntüleme • 4 ay önce

➡️ Quantitative Finance from Scratch, part 39: GARCH. Markets show a clear pattern: calm weeks follow calm weeks, and high volatility days arrive in groups. This is called volatility clustering. Robert Engle introduced the idea in 1982 with the ARCH model (Econometrica), Tim Bollerslev extended it to GARCH in 1986 (Journal of Econometrics), and Engle received the 2003 Nobel Prize in economics for methods of analyzing time series with time-varying volatility. GARCH(1,1) builds tomorrow's variance, the square of volatility, from three parts: a small constant omega that pulls the forecast back toward a normal level, today's move squared times a weight alpha, so a big surprise raises tomorrow's forecast right away, and today's variance times a weight beta, the memory that keeps a high forecast high for a while. The code (garch_reel.py, 16 lines of Python with numpy) uses typical values omega 0.05, alpha 0.10 and beta 0.85, in percent squared per day. The normal level is a volatility of 1 % a day. After a drop of 4 % on a calm day, tomorrow's variance is 0.05 + 0.10 x 16 + 0.85 x 1 = 2.50, so the forecast volatility jumps to 1.58 %. The extra variance then halves every 13.5 trading days: the forecast for day 5 is 1.49 %, for day 10 1.39 % and for day 30 1.16 %. In 1,000,000 simulated days of the same model, a move above 2.5 % happens on 1.75 % of all days, but on 10.97 % of the days right after such a move, about 6.3 times as often. Risk managers use GARCH forecasts to update value at risk, and some funds scale their positions down when the forecast volatility rises. If you want the full picture, there is a longer GARCH video on the YouTube channel. Honest notes: all data in the video is simulated with the GARCH model itself, so the clustering is built in by design; in real markets volatility usually reacts more strongly to falls than to rises, which this simple symmetric model leaves out. The 3D landscape of columns (20 simulated stocks sharing one GARCH volatility) is an illustration with compressed heights, not to scale. The value at risk line uses 1.65 times the forecast volatility, a normal approximation for one day at 95 %. #quantfinance #garch #volatility #riskmanagement #finance Education only, not financial advice.

QuantFinanceToGo

71,900 görüntüleme • 9 gün önce