正在加载视频...

视频加载失败

➡️ Quantitative Finance From Scratch, Part 22: Hypothesis Testing. You start with the null hypothesis: the strategy's true average return is zero, so there is no edge. Then you ask how often pure luck would produce a result at least as extreme as yours if that were true. The...

101,200 次观看 • 1 个月前 •via TikTok

0 条评论

暂无评论

原始帖子的评论将显示在这里

相关视频

➡️ Quantitative Finance From Scratch, Part 20: Backtesting. A backtest tests a trading strategy on historical data, as if you had used it back then, to see whether it would have made money and how much risk it took along the way. Portfolio managers, analysts and quant researchers run backtests before real money goes into an idea. The key idea: split the past in two. You build the rule on the first part (in sample) and then test it on later data it has never seen (out of sample). The out of sample result is the fairer check. Why it matters: if you search the past hard enough, you will find patterns, even in pure noise. Trying rule after rule until one looks good is called data mining, and many of those patterns are just statistical chance. In this video we test 498 simple rules (hold after the price rose or fell over 2 to 250 days) on 10 simulated years of a market with no edge at all. The best rule in the first five years makes +11% in sample. On the next five years, data it has never seen, the same rule loses 28% and drops to rank 460 of 498. The ten best rules in sample lose 18.5% on average out of sample. Even a properly backtested result only describes the past. Markets change, and a pattern that worked for years can stop working. Classic mistakes: look-ahead bias (using information you could not have known at that time), survivorship bias (testing only companies that still exist today) and leaving out trading costs. All numbers come from one simulated run with assumed numbers (seed 20, daily returns with zero average and a 1% daily swing). No real market data, no strategy recommendation. Education only, not financial advice. #quantitativefinance #quant #backtesting #finance #trading

QuantFinanceToGo

35,300 次观看 • 1 个月前

➡️ Quantitative Finance From Scratch, Part 21: Linear Regression in finance Linear regression finds the straight line that best describes how one quantity moves with another. In finance, that is often a stock's daily return against the market's daily return. Least squares: for every day, you measure how far the real return lies from the line, square that distance and add everything up. The best line makes this sum as small as possible. The line has two numbers. The slope is the beta from Part 14: how strongly the stock follows the market. The intercept is alpha: what the stock earns on average on a day when the market does not move. What the line cannot explain is the residual, and R² tells you which share of the swings (the variance) the line explains, from 0 for nothing to 1 for everything. In this video we simulate two years (504 trading days) of a market and a stock with a built-in beta of 1.2, a second factor with a beta of 0.6 and no alpha. The line finds a beta of 1.26 (the 1.2 lies within the range of chance for two years of data), an alpha of +0.05% a day and an R² of 52%. With two inputs, the line becomes a plane: betas 1.27 and 0.60, R² 63%. Quants use regression to estimate betas, to size hedges, to test whether a strategy earns more than its risk, and to check whether two assets really move together. The limits: a regression only finds a relationship in the data you give it. It does not prove that one thing causes the other, a few extreme days can pull the line (three invented extreme days move our slope from 1.26 to 1.10), and a relationship from the past can change. Education only, not financial advice. #quantitativefinance #quant #finance #regression #beta

QuantFinanceToGo

59,100 次观看 • 1 个月前

➡️ Quantitative Finance From Scratch, Part 23: Mean Reversion. Mean reversion means that a quantity which moves far from its long run average tends to drift back toward it. A single stock price behaves much like a random walk, but spreads, ratios and rates (the gap between two related stocks, interest rates, volatility) often show a pull back. The simplest model: every day the distance from the average shrinks by a fixed share, plus a random shock. The half life is the time it takes for half of that distance to disappear, so a short half life means a strong pull back. To test for the pull, you regress today's change on yesterday's distance from the average. A negative slope means a pull back. But even pure chance often looks like a pull here: in our test, 34% of pure random walks passed the usual limit of -2. So quants use a stricter limit for the t statistic of about -3 (the Dickey-Fuller limit, about -2.9). In this video we simulate one spread with a built-in half life of 10 days for four years. The regression finds a slope of -0.070, a t statistic of -6.05 and a half life of 9.5 days, far beyond that limit. The z score measures how many standard deviations the spread is from its average. Is it profitable? Only if the pull is real, strong enough to beat trading costs and still there in data you did not use for testing. A 2016 study of 97 published return signals found that their returns were on average 58% lower after publication. The average can shift, the pull can vanish, and a spread can keep widening before it comes back. Short samples can even make a pure random walk look mean reverting: in our test, three months of a pure random walk typically showed a half life of about 10 days. Education only, not financial advice. #quantitativefinance #trading #meanreversion #statisticalarbitrage #finance

QuantFinanceToGo

23,400 次观看 • 1 个月前

➡️ 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

112,700 次观看 • 1 个月前

➡️ Quant Finance from scratch part 15: the CAPM (Capital asset pricing model) There is a lot of discussion in science ongoing whether it is still a good estimate for expected returns or too simple with just 1 factor (market). Still its crucial to understand the concept itsself. Step 1, a simulated market with assumed numbers, not forecasts: a risk-free asset pays 3 % a year, and the market pays 5 % more on average, with swings of 15.9 % a year. Step 2, eight stocks with betas from 0 to 1.4. Each also has swings of its own, unrelated to the market. Step 3, two of them: one with beta 0.4 and big swings of its own (20 %), one with beta 1.2 and small ones (9 %). Both swing about 21 % a year in total, yet they earned 5.3 % and 9.3 % on average. Step 4, mixing: a mix of 100 stocks like the first still earns 5.1 % but swings only 6.7 %. As in Part 11, a stock's own swings average out in a mix, while the market's swing stays. Beta measures the assets sensitivity to the market movements. Step 5, the line: the eight average returns lie on a straight line against beta, 3.1 % + 5.1 % for every step of 1 in beta. That is the CAPM equation, which gives the expected return of any single stock from its beta: expected return = risk-free rate + beta x (market's expected return - risk-free rate). For beta 1.2 it gives 3 % + 1.2 x 5 % = 9 %, close to the 9.3 % measured. Sharpe shared the 1990 Nobel Memorial Prize in Economic Sciences with Harry Markowitz and Merton Miller, his part for the theory of how assets are priced, the CAPM. The committee notes that several researchers developed it independently in the mid 1960s and names his essay "Capital Asset Prices: A Theory of Market Equilibrium under Conditions of Risk" (Journal of Finance, 1964) as his pioneering achievement. This video is for education only, and nothing in it is financial advice. #quantfinance #capm #beta #finance #python

QuantFinanceToGo

58,900 次观看 • 1 个月前

Ant Group's AI agents found a trading strategy on their own, and with it the fund hasn't lost once in the past year Sharpe ratio came out at 2.5. What used to take a team of PhDs and years of work, the agents did overnight, for free But the real power of this result isn't the number itself Agents can run thousands of times more strategy variations than any human could in a lifetime And the more variations you test, the higher the chance that one of them looks profitable purely by accident Your brain can't tell "I found a pattern" from "I got lucky on the hundredth try." The feeling is identical in both cases The only way to tell them apart: test the result on data the strategy has never seen A real edge survives there. Luck falls apart I got curious what this difference looks like live, so I took two real academic quant strategies and ran both through this exact test The first, Time Series Momentum on Bitcoin, passed: +1,537%, Sharpe 1.02. It looked honest, and it stayed honest The second, Betting Against Beta, a textbook classic in every finance course, looked flawless on paper. Under this test it fell apart: -7.78% a year, while the market grew 14.86% And the second result turned out to be the more valuable one. Not because it's positive, but because it's true, and it showed that before it could take real money I simply described both ideas in plain words, the AI built the exact rules itself and ran them on real data, with no peeking at future data You can test your own idea here (free trial period after sign-up): The same test on momentum and Betting Against Beta, step by step, so you can run it on your own idea tonight, is in the article below

qwinsi

16,825 次观看 • 1 个月前

➡️ Part 29 of Quantitative Finance From Scratch: the Carhart four-factor model. The CAPM explains a stock's return with its beta, its exposure to market risk. Eugene Fama and Kenneth French (1993) added size and value, and Mark Carhart (Journal of Finance, 1997) added momentum, the tendency of last year's winners to keep winning for a while. In his model every beta is an exposure: to the market, to size, to value and to momentum. In his study of mutual funds, these four factors and fund costs almost completely explained why some funds seemed to keep winning. Our test run (assumed numbers, a teaching example: 50 years of monthly returns, four independent factors with assumed premiums, five stocks that all have a market beta of 1 and a true alpha of zero): the stock with market exposure only earns 9.6 % a year above cash, the size stock 10.7 %, the value stock 13.3 %, the momentum stock 12.8 % and the stock with all three exposures 19.7 %. For that last stock the market alone explains 40 % of its swings, three factors 69 % and all four 94 %. Real single stocks swing far more on their own, so real fits are lower, and luck still left one simulated stock with an alpha of about -3 % a year. Since then researchers have proposed many more factors. John Cochrane (2011) spoke of a "zoo of new factors", and Harvey, Liu and Zhu (2016) counted hundreds of proposed factors and warned that many are likely false discoveries. Education only, not financial advice. #quantfinance #factorinvesting #carhart #finance #python

QuantFinanceToGo

23,600 次观看 • 24 天前

➡️ 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

41,100 次观看 • 4 天前

➡️ Quantitative Finance From Scratch, Part 24: Momentum. Momentum means that assets which rose the most over the past months tend to keep rising a little longer, and the biggest losers tend to keep falling. It is the opposite of mean reversion from part 23. Quants usually measure it as the return over the past 12 months, leaving out the most recent month, because very short moves tend to reverse. In research, a classic momentum portfolio ranks many stocks by this past return, buys the top group, sells the bottom group and repeats this every month. In practice there are two common versions: long only (you only hold the top ranked stocks, for example through a momentum fund) and long short (winners minus losers, so the ups and downs of the whole market largely cancel out). In this video we simulate 500 stocks for 30 years with a small built-in continuation: expected returns that drift slowly. The long short version earns 5.9% a year with a t statistic of 6.00 and a beta of -0.01 to the market. The long only version earns 13.7% a year, but with a beta of 0.99 it moves almost one for one with the market, which itself earned 10.5% a year in this simulated path. Momentum has been found in stocks, bonds, currencies and commodities, and in more than 200 years of stock data. It also has a dangerous side: after a market fall, a sharp rebound can lift the past losers fast, and momentum portfolios have had sudden, very large losses, for example in spring 2009. Some studies find it weaker and more volatile in recent decades, and trading costs eat a part of it, but it has not disappeared. All numbers come from one simulated run with assumed numbers (seed 24). No real market data, no strategy recommendation. Education only, not financial advice. #quantitativefinance #quant #momentum #factorinvesting #finance

QuantFinanceToGo

54,000 次观看 • 1 个月前

➡️ 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,500 次观看 • 27 天前

You have 100 dollars and you want 200. Betting red one dollar at a time, your chance is one in 33,171. Betting the whole 100 on a single spin, it is 47.4 percent. The careful version is fifteen thousand times worse. This is also the arithmetic of your trading account, and it means almost everything you have been taught about managing risk is, in the strict mathematical sense, a method for losing more reliably. An MIT professor works this out on a blackboard in a lecture on random walks. The result is called gambler's ruin. Two and a half points of disadvantage is nothing on one spin. But a dollar at a time you are not making one spin, you are making hundreds, and the edge gets a fresh attempt at you on every one of them. It was never the size of the disadvantage. It is the number of times you agree to face it. One hundred on red, once: 47.4 percent. Twenty dollar bets: 37.3 percent. Five dollar bets: 11.1 percent. One dollar bets: 0.003 percent. Mathematicians call the right answer bold play. It was proved optimal for unfavourable games in 1965. It is not a strategy for winning. It is the least ruinous way to play a game you should not be in. If your edge after spread and fees is negative, and for most active retail accounts it is, then your position sizing rule is not protecting you. Risking one percent per trade is the one dollar bet. It arrives at zero with near certainty, just politely, over a longer period, with a spreadsheet. Discipline does not beat a negative edge. It schedules it. All of this reverses if you have a real edge. Then small and frequent is correct and bold play is madness. So the only question that has ever mattered is whether you have one, and the number of people certain they do has never resembled the number who do. Your broker does not need you to be wrong. It needs you to be frequent.

Verax

85,472 次观看 • 2 个月前

Citadel and Renaissance make billions on one test you've never heard of. It's now free. And almost no trading strategy survives it Most traders don't even know their strategy is dead. Because they never do the one thing every hedge fund does Split the history in half. Build the strategy on the first half. Don't touch the second one, the strategy must never see it Then test it only on that second half. If the edge is gone, it was never there. It was a fit to the past But here's the trap few people know. If you tried 200 versions and kept the best one, even this check will lie to you. Because one of the 200 passes it by pure luck That's what funds count and you don't. Not how pretty the chart is, but how many times you tried before it got pretty I took a simple rule: hold the S&P when it's above its 200-day average, exit when it's below On the years it had never seen, the same growth as buy-and-hold, but half the drawdown Then I ran it with the average at 50, 100, 150, 200, 250 days. A real edge holds across all of them. Luck works on one number and dies on the next Most textbook strategies don't pass this test. Your meme-coin one has no chance And here's the main trap: the prettier the chart, the more you believe it. The more you believe, the more you bet So the strategy you love most takes the most money The market will test your strategy either way. The only question is whether it's before or after you put money into it How to run this test on real data, before your strategy touches your money, in the article below

qwinsi

10,334 次观看 • 28 天前

Game theory says the only rational answer is 1. Ben Polak had the smartest students at Yale play it for real - and 1 lost every single year. The winning number was 9, and being right is exactly what got you beaten. The game is simple. Everyone picks a whole number from 1 to 100. Whoever lands closest to two-thirds of the class average wins the money. Work it backwards and the logic is airtight. If people guess at random the average is 50, so you should pick two-thirds of that, 33. But if everyone thinks that far, the average is 33, so you pick 22. Chase the reasoning to its end and every number collapses to 1 - the Nash equilibrium, the only choice that survives if everyone is rational, knows everyone is rational, and knows that they know, forever. So 1 is the "correct" answer. It also loses. The reason is a model of how deep people actually reason: g = 50 × (2/3)^k Start at 50, the random baseline. Each k is one round of "assume everyone else divides by two-thirds." Level 1 gives 33. Level 2 gives 22. Level 3 gives about 15. The Nash player sits at k = infinity and lands on 1. Real humans do not go to infinity. Polak's class averaged 13.33, which the model places at roughly level 3. Two-thirds of 13.33 is 8.9. Round it, and 9 wins. Anyone who played the "rational" 1 was several levels too deep and finished nowhere. This is not a one-off. The same game run on Yale classes came in at 18.5, then 21.5, then 23, then 13.33. Never close to 1. The crowd reasons two to three levels deep and no further, so the money sits near two-thirds of that, not at the equilibrium. It generalizes anywhere the payoff depends on the crowd rather than the theory. A market can stay "wrong" for years because the winning move is not fair value, it is two-thirds of the average guess at fair value. Keynes called it the beauty contest sixty years before anyone put a number on it. The equilibrium tells you where the game ends if everyone is perfect. The money is one step ahead of where the crowd actually stands. Model the players, not the theory.

Orion

177,819 次观看 • 3 个月前