Quant Trading Science Park
Quant Trading Science Park: notes for every episode, to use alongside the video: preview, review, and jump back to any section.
All episodes (newest first)
Options Long Straddle Backtest: Trading It Every Day Loses Over the Long Run, With Chances to Profit Only in High-Volatility Periods
Running a long straddle every day loses money over the long run, because the 2x take-profit triggers only 4.6% of the time and the overnight session's time value decays quickly; profit chances exist only in high-volatility periods, so enter only then and keep position size tightly controlled.
Auditing Online Course Strategies with AI: Out-of-Sample Backtesting and Building Your Own XQ Minute-Bar Database
The course strategy really did make money back when the instructor taught it, but its out-of-sample results are poor, so you need AI plus a complete historical database to run a backtest audit and see whether the performance can last.
Disposition Stock Strategy Flips From Bull to Bear: Why It Is Paused When the Market Weakens
The strategy of buying strong disposition stocks after they exit the restricted period worked in the bullish month of 9 but lost money whatever the approach once the market fell in month 10, so the speaker paused it without shorting and will watch again when the market returns to a bull trend.
SDT Shared Variables: Fixed Memory That Saves Resources and Lets Instruments in the Same Strategy Pass Data to Each Other
SDT shared variables take up a fixed amount of memory no matter how many candlesticks there are, which saves resources, improves execution efficiency, and lets instruments in the same strategy pass data to each other; the cost is that you cannot read past values and cannot backtest.
Foreign Capital Rotates Into Defensive Stocks, and a Review of Live Disposition Stock Trades
Foreign capital is moving out of electronics stocks into defensive sectors such as financials and telecoms, so trading should be a bit more conservative; the disposition stock strategy has made small gains and more losses over the past 2 weeks and missed one surging stock, so more data is needed to tell whether the problem is the strategy or the market environment.
A Live Trading Strategy Under the New Disposition Stock Rules: Buy on Day 1, Sell on the Last Day, and Use Stop-Losses
After disposition periods changed to 5 days with 2-minute call matching, prices no longer pull back much and the more a stock rises on day 1 the stronger it stays, so the strategy now picks stocks that were put under disposition after rising and trade at or above the flat price, buys on day 1, sells on the last day, and controls risk with a 7% to 10% stop-loss; live trades over the past 2 weeks were mostly small gains with no big losses.
Disposition stocks no longer pull back under the new rules: buy those that close strong on day 1 and sell on day 5
Since disposition stocks moved to 5 days with 2-minute matching, they no longer pull back before rising but climb steadily without looking back, so the strategy should switch from buying pullbacks to buying only stocks that gain 3% or more by the day-1 close and selling on day 5.
Picking Stocks at the Second-Wave Breakout: Big Prior Rally, Low-Volume Consolidation, Then a High-Volume Long Red Candle
To catch the second-wave breakout point of a strong stock, you must first describe the pattern of a big prior rally, low-volume consolidation and a high-volume long red candle item by item in plain language, because only then can it be turned into a stock-screening program; ideas based on intuition alone are hard to convert directly into code.
Is a High-Volume Long Upper Shadow a Reversal or a Bullish Shakeout? A 3-Year Backtest
A 3-year backtest at 15-minute frequency of high-volume long upper shadows found wins and losses split evenly with no directional edge, and adding the condition that the next day closes above half of the upper shadow still gave an even split, so a single candlestick cannot predict direction.
Automated Trading Without Coding Skills: Split a Strategy into Four Building Blocks of Stock Selection, Entry, Exit and Position Control
You can do automated trading even if you are not good at coding by splitting a strategy into four blocks (stock selection, entry, exit and position control); each block is small and easy to understand, so they can be handled separately and recombined repeatedly.
Manual Entry, Automatic Exit: Using XQ Semi-Automated Trading to Free Up Office Workers
Pick more precise entry points by hand and let an XQ script exit automatically under preset conditions, so office workers don't have to watch the market and can focus on improving entry quality.
Measuring Bullish Strength from a Single Candlestick
The bullish strength indicator converts a single candlestick's open-to-low distance (defense) and close-to-high distance (offense) into a value to judge how aggressively major players are attacking, but it is not an entry signal and works only as a filter for deciding whether to lean long or short in day trading.
RSI Bearish Divergence Algorithm and Tolerant Sampling: Syncing Price Highs with Indicator Highs
The key to detecting divergence is to define the price high first, then map the indicator to that high using either a fixed position or tolerant sampling before and after it; once these two problems are solved, RSI, KD, MACD and other divergences can all be coded the same way.
Recreating the Day-Trading Three Lines and a Short Alert for Breakouts That Fall Back, Using XS
The day-trading three lines need only the high and low of today's highest-volume candlestick plus today's average price line, so they can be written in XS with a few variables, and a short alert can be added for a breakout that falls back below the lines.
Detecting Volume-Price Divergence with Code: Comparing Price and Volume at Two Swing Highs
Volume-price divergence can be detected automatically in code: use CSwingHigh to find the two most recent swing highs, and when price is higher but volume is lower, flag it as divergence and mark it; the same structure works with RSI or KD values.
Automatically Detecting an M-Top with XScript: Swing Highs, Neckline and Multiple Filter Conditions
An M-top can be detected automatically with code: define the lookback range, two highs, the neckline and the starting low, then find the highs with a swing high function and stack several filter conditions so the result stays close to the standard pattern.
Custom SwingHighBar: Finding Perfect Peaks with Rising Left Side and Falling Right Side
XQ's built-in SwingHighBar only requires the bars on both sides of a high to be lower, which easily picks up unattractive turning points, so a custom function was written that requires the left side to rise bar by bar, the right side to fall bar by bar, and every step to exceed a set percentage.