Community indexFollow @zostaff

quantleak.zip
Meme

Formulas · 78

Every free trading strategy formula on the internet (78)

Published rules with the formula written out and a source you can open. No backtest results are claimed here.

A formula is a definition, not a forecast. Costs, borrow and regime changes are not inside the expression. Thresholds that are conventions are labeled as choices.

Share

78 on this page · j/k to move · / to filter

Showing 78 of 78

01
Share

Five lines from midpoints of ranges. A common trend rule is long when price is above the cloud and the fast line is above the slow one.

Tenkan = (highest high + lowest low) / 2 over 9
Kijun = the same over 26
Span A = (Tenkan + Kijun) / 2, plotted 26 ahead
Span B = (highest high + lowest low) / 2 over 52, plotted 26 ahead
The 9, 26 and 52 lengths are Hosoda's defaults, not a law.
  • Trend
  • Stocks · Futures · Forex
  • Public formula

ClaudeAsk Claude to compute Tenkan and Kijun from a short high-low table and say which side of the cloud price is on.

02
Share

Where the close sits in the recent high-low range, signed so zero is the top and -100 is the bottom.

%R = -100 * (highest high(n) - close) / (highest high(n) - lowest low(n))
n = 14 is the common window.
A fade treats readings near 0 as stretched up and near -100 as stretched down. Those bands are a convention.
  • Mean reversion
  • Stocks · Futures
  • Public formula

ClaudeAsk Claude to compute one bar's %R from a high, a low and a close you provide.

03
Share

A running total that adds volume on up closes and subtracts it on down closes. Traders watch disagreements with price.

If close > prior close, OBV = OBV + volume
If close < prior close, OBV = OBV - volume
A divergence rule: price makes a new high and OBV does not.
That rule is a reading, not a theorem.
  • Trend
  • Stocks · Crypto
  • Public formula

ClaudeAsk Claude to update OBV across five rows and say whether the last high was confirmed.

04
Share

An RSI built on typical price times volume, so a push on heavy volume counts for more.

Typical price = (high + low + close) / 3
Raw flow = typical price * volume
Split the flow into up and down days over n bars.
MFI = 100 - 100 / (1 + up flow / down flow)
n = 14 is common.
  • Mean reversion
  • Stocks · Futures
  • Public formula

ClaudeAsk Claude to classify one bar as up or down flow and show the ratio.

05
Share

Horizontal levels inside a prior swing. The ratios are a convention. Price is not required to stop on them.

Range = swing high - swing low
Level(r) = swing high - r * range, for a pullback in an upswing
Common ratios r are 0.382, 0.5 and 0.618.
Which swing you pick changes every level.
  • Mean reversion
  • Stocks · Futures · Forex
  • Public formula

ClaudeAsk Claude to place three levels from a high and a low you choose, and to label them as conventions.

06
Share

Today's reference levels from yesterday's high, low and close. Floor traders used them as a map, not as a forecast.

P = (high + low + close) / 3 of the prior session
R1 = 2P - low
S1 = 2P - high
R2 = P + (high - low)
S2 = P - (high - low)
The session boundary is a choice.
  • Mean reversion
  • Futures · Stocks · Forex
  • Public formula

ClaudeAsk Claude to compute P, R1 and S1 from three prices and state which session they belong to.

07
Share

A smoothed candle. A common trend rule stays long while the smoothed close is above the smoothed open.

HA close = (open + high + low + close) / 4
HA open = (prior HA open + prior HA close) / 2
HA high = max(high, HA open, HA close)
HA low = min(low, HA open, HA close)
The wick rule people add on top is a convention.
  • Trend
  • Stocks · Futures · Crypto
  • Public formula

ClaudeAsk Claude to build one smoothed bar from OHLC and the previous smoothed open and close.

08
Share

Bricks that print only after price moves a fixed amount. Time is not the x-axis. The box size is the whole parameter.

A new brick prints when price has moved one box from the last brick's close.
A common reversal needs a two-box move the other way.
Box size is a fixed price or a multiple of ATR. That choice is yours.
  • Trend
  • Futures · Stocks
  • Public formula

ClaudeAsk Claude to say how many bricks a move of 2.5 boxes would print, and when a reversal would print.

09
Share

Once a year, own the ten Dow stocks with the highest dividend yield, in equal weight. O'Higgins's screen.

Yield = indicated annual dividend / price
Each rebalance, hold the 10 highest yields in the Dow, equal weight.
The dividend drop on the ex-date is not in the yield ranking.
  • Factor
  • Stocks
  • Public formula

ClaudeAsk Claude to rank a small yield table and say what the screen ignores, including the ex-date drop.

10
Share

Greenblatt's screen: rank stocks by earnings yield and by return on capital, then own the combined top of the list.

Earnings yield = EBIT / enterprise value
Return on capital = EBIT / (net working capital + net fixed assets)
Rank each, add the ranks, own the best combined ranks.
The accounting definitions are the book's. Do not swap in a third ratio and keep the name.
  • Factor
  • Stocks
  • Public formula

ClaudeAsk Claude to compute both ratios from figures you paste and add the ranks, without a third metric.

11
Share

O'Neil's checklist. The pieces people code are earnings growth and a relative-strength rank of the price.

Relative strength rank = percentile of trailing price performance in the universe
Earnings growth is the reported change versus the prior period.
The other letters are qualitative screens. The checklist is not a closed-form edge.
  • Factor
  • Stocks
  • Public formula

ClaudeAsk Claude to compute a percentile rank from a return column and leave the letter labels as a checklist.

12
Share

Buy a call and a put at the same strike and expiry. You pay a debit. You need a large move to clear it.

Debit D = call premium + put premium
Breakevens at expiry = K + D and K - D
Max loss = D
A short straddle flips the signs, and the loss is not capped.
  • Options
  • Options
  • Public formula

ClaudeAsk Claude to place the breakevens from a strike and two premiums, and to say the short version is uncapped.

13
Share

Buy an out-of-the-money put and an out-of-the-money call. Cheaper than a straddle, and further from the spot.

Debit D = put premium + call premium
Breakevens = put strike - D and call strike + D
Max loss = D
Both options must be the same expiry or it is not this structure.
  • Options
  • Options
  • Public formula

ClaudeAsk Claude to compute both breakevens from strikes and a debit you provide.

14
Share

Long one low strike, short two in the middle, long one high strike, with equal gaps. A small debit for a peaked payoff.

Strikes K1 < K2 < K3 with K2 - K1 = K3 - K2
Long 1 call at K1, short 2 at K2, long 1 at K3
Debit D
Max profit = (K2 - K1) - D, at K2
Max loss = D
  • Options
  • Options
  • Public formula

ClaudeAsk Claude to fill max profit and max loss from three strikes and a debit.

15
Share

A call spread and a put spread on the same two strikes. At expiry the payoff is just the distance between the strikes.

Payoff at expiry = K_high - K_low, for the long box
The fair price is that distance discounted. A gap versus the market is the whole trade.
American early exercise and fees usually dominate the gap. This is an identity, not a recommendation.
  • Options
  • Options
  • Public formula

ClaudeAsk Claude to discount a strike distance at a rate you give, and list why the traded price will not match it.

16
Share

Hold shares against an option so the position's net delta is about zero. You rebalance when delta drifts.

Share hedge = - (option delta) * contract multiplier
Net delta near 0 is the target.
The band that triggers a rebalance is a choice.
Gamma and the gap through the hedge are not in this one line.
  • Options
  • Options · Stocks
  • Public formula

ClaudeAsk Claude to size a hedge from a delta and a multiplier, and name what a gap does to it.

17
Share

Compare an option's implied volatility with a forecast of realised volatility, then delta-hedge. Being short options is not capped.

Rough P&L ≈ vega * (implied vol - realised vol) - hedging error
If implied is richer, the common structure is short the option and delta-hedged.
The hedge is not free, and a short option's loss is not capped by the premium.
  • Options
  • Options
  • Public formula

ClaudeAsk Claude to write the approximation and state that a short option is uncapped.

18
Share

Trade the leftover after a factor model, when that leftover is far from its own recent average.

Fit a factor model. Residual e is what the model does not explain.
z = (e - mean of e) / stdev of e, on a trailing window
Enter when abs(z) > k. Exit near 0.
k is a choice. The fit must end before the trade.
  • Factor
  • Stocks
  • Public formula

ClaudeAsk Claude to score a residual you paste and refuse to pick k for you.

19
Share

Own what has been rising and short what has been falling, usually sized so each market risks a similar amount.

Signal = sign of the trailing return over k
Weight ≈ (target risk) / (recent volatility)
k and the target are choices. The Moskowitz time-series paper is the empirical cousin, listed separately.
  • Trend
  • Futures · Stocks · Forex
  • Public formula

ClaudeAsk Claude to sign three trailing returns and scale them to the same volatility target.

20
Share

Buy before the ex-date and sell after, hoping to keep the dividend. The price usually drops by about that amount.

Net ≈ dividend - price drop on the ex-date - tax - spread
The drop is often near the dividend before costs.
The trade is the residual after that drop, which is frequently smaller than the spread.
  • Factor
  • Stocks
  • Public formula

ClaudeAsk Claude to compute the residual from a dividend and a price drop you supply, then subtract a spread.

21
Share

A trend rule that is long when a shorter average of price sits above a longer one.

SMA(n)_t = (P_t + ... + P_{t-n+1}) / n
Long when SMA(short) crosses above SMA(long).
Flat or short on the cross the other way.
The two lengths are choices. 50 and 200 days is a common pair, not a requirement.
  • Trend
  • Stocks · Futures · Forex · Crypto
  • Public formula

ClaudeAsk Claude to code the cross on one liquid series, charge a fee, and compare it with buy-and-hold.

22
Share

The same cross as a simple average, with more weight on the newest price.

EMA_t = alpha * P_t + (1 - alpha) * EMA_{t-1}
alpha = 2 / (n + 1)
Long when the faster EMA crosses above the slower EMA.
  • Trend
  • Stocks · Futures · Forex · Crypto
  • Public formula

ClaudeAsk Claude to show how alpha changes the weight of a price from ten bars ago.

23
Share

A trend rule on the gap between two exponential averages, smoothed again into a signal line.

MACD = EMA(12) - EMA(26)
Signal = EMA(9) of MACD
Histogram = MACD - Signal
Long when MACD crosses above the signal line.
12, 26 and 9 are the common setting, not a law.
  • Trend
  • Stocks · Futures · Forex · Crypto
  • Public formula

ClaudeAsk Claude to compute MACD from a short price list by hand for three rows so the recursion is visible.

24
Share

Buy a new high of the prior channel and sell a new low. The turtle entry is this rule with a stated window.

Upper_t = max(High of the prior n bars)
Lower_t = min(Low of the prior n bars)
Buy stop at the upper channel. Sell stop at the lower.
n = 20 is the classic entry window. An exit window is a separate choice.
  • Trend
  • Futures · Stocks · Forex · Crypto
  • Public formula

ClaudeAsk Claude to code the channel using only prior bars, and show where a same-bar high would cheat.

25
Share

A trend trade with the stop set in units of Wilder's true range, which is also the core of the Supertrend band.

TR = max(High-Low, abs(High-PriorClose), abs(Low-PriorClose))
ATR = Wilder average of TR over n
Stop = extreme price since entry, minus c * ATR, for a long.
Supertrend mid = (High+Low)/2
Bands = mid ± m * ATR, and a band only moves in the trend's direction.
c, m and n are choices.
  • Trend
  • Futures · Stocks · Forex · Crypto
  • Public formula

ClaudeAsk Claude to compute TR for five bars by hand, then place a 3-ATR stop on a long you specify.

26
Share

Wilder's trailing stop that accelerates as a trend runs. A flip of the stop is the reversal signal.

SAR_{t+1} = SAR_t + alpha * (EP - SAR_t)
alpha starts near 0.02 and steps up toward a cap, often 0.20.
EP is the best price since the trade started.
A long flips when price trades through the SAR.
  • Trend
  • Futures · Stocks · Forex
  • Public formula

ClaudeAsk Claude to step the SAR for a handful of bars and show when alpha increases.

27
Share

Not a standalone entry. A filter that allows other trend signals only when directional movement is strong.

+DI and -DI come from smoothed up-moves and down-moves, scaled by ATR.
DX = 100 * abs(+DI - -DI) / (+DI + -DI)
ADX = smoothed DX
A common gate is ADX above 25. That 25 is Wilder's convention.
  • Trend
  • Futures · Stocks · Forex
  • Public formula

ClaudeAsk Claude to add the filter to a Donchian rule and count how many signals it removes.

28
Share

A channel around an average, with the width set by true range rather than by standard deviation.

Mid = EMA(n)
Upper = Mid + m * ATR
Lower = Mid - m * ATR
A breakout buys a close above the upper band.
n and m are choices. 20 and 2 is a common pair.
  • Trend
  • Futures · Stocks · Forex · Crypto
  • Public formula

ClaudeAsk Claude to plot the band on one series and mark closes outside it.

29
Share

The sign of an asset's own past return. Unlike cross-sectional momentum, it does not rank a universe.

r = P_{t-1} / P_{t-1-k} - 1
Position = sign(r)
The paper's main tests use about twelve months for k.
Sizing each market by inverse volatility is an overlay, not part of the sign.
  • Trend
  • Futures · Stocks · Forex · Crypto
  • Public formula

ClaudeAsk Claude to apply the sign rule to one futures series and state the lookback in trading days.

30
Share

Wilder's oscillator. A mean-reversion use fades very low and very high readings.

Average gain and loss use Wilder's smooth:
avg_t = (avg_{t-1} * (n - 1) + today) / n
RS = avg gain / avg loss
RSI = 100 - 100 / (1 + RS)
n = 14 is the common length. 30 and 70 are conventional bands, not thresholds from a theorem.
  • Mean reversion
  • Stocks · Futures · Forex · Crypto
  • Public formula

ClaudeAsk Claude to compute RSI on a short series and show the first bar where the average is defined.

31
Share

A band around a moving average, sized by recent standard deviation. Fading the band and trading the breakout are opposite uses of the same formula.

Mid = SMA(n)
Upper = Mid + k * stdev(n)
Lower = Mid - k * stdev(n)
Bollinger's common setting is n = 20 and k = 2.
A fade buys the lower band. A breakout buys through it. Pick one before you test.
  • Mean reversion
  • Stocks · Futures · Forex · Crypto
  • Public formula

ClaudeAsk Claude to count band touches on one series and say which rule you chose, fade or breakout.

32
Share

Where the close sits inside its recent high-low range. Low means near the bottom of that range.

%K = 100 * (Close - LowestLow(n)) / (HighestHigh(n) - LowestLow(n))
%D = SMA(%K, d)
A fade treats a very low %K as stretched. n = 14 and d = 3 are common.
  • Mean reversion
  • Stocks · Futures · Forex
  • Public formula

ClaudeAsk Claude to compute %K for one bar from the high, low and close you provide.

33
Share

How far typical price is from its average, scaled so that readings beyond about 100 are the unusual ones.

TP = (High + Low + Close) / 3
CCI = (TP - SMA(TP, n)) / (0.015 * mean absolute deviation of TP)
The 0.015 is Lambert's scale. n = 20 is the common window.
  • Mean reversion
  • Futures · Stocks · Forex
  • Public formula

ClaudeAsk Claude to explain why the 0.015 is there, using the definition rather than a trade.

34
Share

Pick two series that moved together, then trade the gap when it widens. This is the distance method, not a cointegration test.

Normalise both prices over a formation window.
Choose the pair with the smallest sum of squared differences.
Enter when the spread is two historical standard deviations from its mean.
Exit at the mean.
The two-deviation rule is the paper's threshold.
  • Mean reversion
  • Stocks
  • Public formula

ClaudeAsk Claude to form the spread from two price columns and mark the entry and exit levels.

35
Share

A hedge ratio from a regression, then a z-score of the residual. The ratio has to be fit on data the trade cannot see.

Fit y = a + b * x + e on a window that ends before the trade.
z = (e - mean(e)) / stdev(e)
Enter when abs(z) > k. Exit when z crosses 0.
k is a choice, often near 2.
  • Mean reversion
  • Stocks · Futures · Forex
  • Public formula

ClaudeAsk Claude to estimate b on the first half of a sample and score z only on the second half.

36
Share

A check on whether a spread pulls back fast enough to be worth trading after costs. It is a diagnostic before a pairs rule.

Discrete regression: X_t - X_{t-1} = a + b * X_{t-1} + error
kappa = -ln(1 + b)
Half-life = ln(2) / kappa
If b is not negative, there is no pull toward the mean in that sample.
  • Mean reversion
  • Stocks · Futures · Forex
  • Public formula

ClaudeAsk Claude to estimate the half-life of a spread and say whether it is shorter than your holding rule.

37
Share

Session VWAP is the volume-weighted average print. A fade treats a large distance from it as stretched. The same number is an execution benchmark.

VWAP_t = sum(Price_i * Volume_i) / sum(Volume_i) over the session so far.
A fade enters when price is more than c * session-sigma from VWAP.
c is a choice. VWAP resets with the session.
  • Mean reversion
  • Stocks · Futures · Crypto
  • Public formula

ClaudeAsk Claude to compute VWAP from a small tape of price and volume, then define the distance in sigmas.

38
Share

Rank a universe by past return, skipping the latest month, and own the winners against the losers.

r_i = P_{i,t-1} / P_{i,t-12} - 1
Sort the cross-section.
Long the top slice, short the bottom slice.
Jegadeesh and Titman, 1993, skip the most recent month. Equal weight and value weight are both used.
  • Factor
  • Stocks
  • Public formula

ClaudeAsk Claude to rank a small universe you paste and flag any name that was not listed for the full window.

39
Share

The short-horizon opposite of twelve-month momentum: last month's losers against last month's winners.

Rank by the previous month's return.
Long the losers. Short the winners.
Hold for about one month.
This is a published pattern in US samples, not a reason to buy a falling stock.
  • Mean reversion
  • Stocks
  • Public formula

ClaudeAsk Claude to build the ranking from a return matrix and state the holding window before any P&L.

40
Share

After an earnings announcement, stocks with positive surprises tended to keep outperforming for a while in the original studies.

Surprise = (reported earnings - consensus) / price
Long the high-surprise slice. Short the low-surprise slice.
Bernard and Thomas held the portfolios on the order of sixty trading days.
The window is a research choice around that result.
  • Factor
  • Stocks
  • Public formula

ClaudeAsk Claude to define surprise from a small table and say what you do when consensus is missing.

41
Share

Two of the original Fama-French portfolios: small minus big, and high book-to-market minus low.

Book-to-market = book equity / market equity
SMB is long small market caps and short large ones.
HML is long high book-to-market and short low book-to-market.
The published factors are portfolio returns. They are not a net-of-cost trading system.
  • Factor
  • Stocks
  • Public formula

ClaudeAsk Claude to compute book-to-market from a balance sheet and a price you paste, and name the date of each.

42
Share

A quality sort that uses gross profit over assets, not earnings. High gross profitability against low.

Gross profitability = (revenue - cost of goods sold) / total assets
Long the high slice. Short the low slice.
Novy-Marx. The accounting definitions have to match the filing, not a adjusted headline.
  • Factor
  • Stocks
  • Public formula

ClaudeAsk Claude to compute the ratio from a 10-K excerpt and say which lines you used.

43
Share

Long low-beta assets and short high-beta assets, with leverage chosen so the book is roughly beta-neutral.

Estimate beta_i from a regression of excess returns on the market.
Long the low-beta slice, short the high-beta slice.
Scale so each side has about the same beta.
The paper's weights lean on 1/beta. Borrow and the short side are the practical constraints.
  • Factor
  • Stocks
  • Public formula

ClaudeAsk Claude to estimate beta for three names you paste and show the scale that would zero the book beta.

44
Share

Own the stocks whose recent returns moved the least. In several published samples they did not underperform the way a simple risk model expects.

sigma_i = standard deviation of recent returns
Long the lowest-volatility slice of the universe.
A one-year window of daily returns is a common research choice.
Ang, Hodrick, Xing and Zhang is the usual citation for the pattern.
  • Factor
  • Stocks
  • Public formula

ClaudeAsk Claude to rank a universe by trailing volatility and say what the rule does in a crash month.

45
Share

A composite quality score against its opposite. The weights live in the paper. They are not restated here as if they were obvious.

Score each stock on the paper's profitability, growth, safety and payout measures.
Long high quality. Short low quality, which they call junk.
Use their published construction rather than a homemade average of four ratios.
  • Factor
  • Stocks
  • Public formula

ClaudeAsk Claude to list the four buckets from the paper and refuse to invent the z-score weights.

46
Share

A relative-strength rule that also steps aside when the winner is not beating cash.

Absolute test: trailing 12-month return of the asset versus T-bills.
If it fails, hold bills.
Relative test: among assets that pass, hold the highest trailing 12-month return.
Antonacci. The lookback is part of the published rule.
  • Factor
  • Stocks · Bonds
  • Public formula

ClaudeAsk Claude to apply both tests to a two-fund list you paste and name the holding for this month.

47
Share

Own the assets that pay you to hold them, financed by the ones that cost you. The spot move can erase the income.

For currencies, carry is approximately the interest differential.
Rank by carry. Long high yield, short low yield.
P&L = carry + the spot change.
For futures, carry is read from the slope of the curve. The paper defines it by asset class.
  • Factor
  • Forex · Futures · Bonds
  • Public formula

ClaudeAsk Claude to compute FX carry from two interest rates you provide and add a hypothetical spot move.

48
Share

Size positions so risk, not dollars, is spread across assets. The naive version ignores correlations.

Naive weights: w_i = (1 / sigma_i) / sum(1 / sigma_j)
sigma_i is a trailing volatility estimate.
Equal risk contribution solves for weights whose marginal risk contributions match.
Rebalance on a schedule. The correlation assumption is the fragile part of the naive form.
  • Portfolio
  • Stocks · Bonds · Commodities
  • Public formula

ClaudeAsk Claude to turn four volatilities into naive risk-parity weights that sum to 1.

49
Share

Hold 1/N in each asset and rebalance. The cited paper's point is that this rule is hard to beat out of sample.

w_i = 1 / N
Rebalance on a fixed schedule.
No expected-return estimate goes into the weight.
  • Portfolio
  • Stocks
  • Public formula

ClaudeAsk Claude to rebalance a five-name book back to 1/N from prices you paste, and count the turnover.

50
Share

The conventional mix of 60 percent equities and 40 percent bonds, rebalanced when the weights drift.

w_equity = 0.60
w_bonds = 0.40
Rebalance yearly, or when a weight moves by a band you set in advance.
This is a convention. A historical path is not an expected return.
  • Portfolio
  • Stocks · Bonds
  • Public formula

ClaudeAsk Claude to show the drift of a 60/40 after a year of returns you paste, and the trades that restore it.

51
Share

Scale exposure so recent realized volatility matches a target. You take less risk after a wild period.

w_t = sigma_target / sigma_hat_t
sigma_hat is trailing realized volatility.
Cap the leverage. The cap is not in the fraction, and it changes the result.
The target and the window are choices.
  • Portfolio
  • Stocks · Futures
  • Public formula

ClaudeAsk Claude to compute the scale from a target and a trailing volatility, then apply a leverage cap you set.

52
Share

A floor under the portfolio, with equity exposure set as a multiple of the cushion above that floor.

Cushion = Assets - Floor
Equity = m * Cushion, and not more than Assets
The rest stays in the reserve.
The floor can grow at a financing rate. m is the multiplier. A large m spends the cushion quickly.
  • Portfolio
  • Stocks · Bonds
  • Public formula

ClaudeAsk Claude to step the cushion for a down move you specify and show when equity hits zero.

53
Share

The bet size that maximises expected log wealth if you know the edge and the odds. Real estimates are noisier than that.

Even-style bet with net odds b, win probability p, loss probability q:
f* = p - q / b
Continuous case: f* = mu / sigma^2
Fractional Kelly uses c * f* with c below 1.
Full Kelly assumes mu and sigma are known.
  • Portfolio
  • Multi-asset
  • Public formula

ClaudeAsk Claude to compute f* from an edge you state, then show a half-Kelly size and the assumption that makes it wrong.

54
Share

Start from the market portfolio and tilt only where you have an explicit view. No view means you hold the market.

Prior excess return Pi = delta * Sigma * w_market
Views are a pick matrix P, outcomes Q, and uncertainty Omega.
The posterior mixes Pi with the views.
delta is risk aversion. Black and Litterman, 1992.
  • Portfolio
  • Stocks
  • Public formula

ClaudeAsk Claude to set a prior from market weights you paste and apply one view, showing the tilt.

55
Share

Cluster assets by correlation, then split weight by inverse variance down the tree. There is no expected-return input.

1. Distance from correlation, then a cluster tree.
2. Reorder the covariance so close assets sit together.
3. Split capital recursively by inverse cluster variance.
Lopez de Prado. Use the paper's split, not a homemade average of volatilities.
  • Portfolio
  • Stocks · Multi-asset
  • Public formula

ClaudeAsk Claude to cluster a small correlation matrix and explain one split without inventing a return forecast.

56
Share

Markowitz: weights from expected returns and the covariance. Drop the expected returns and the same problem is minimum variance.

Maximise w' mu - (lambda / 2) * w' Sigma w, with sum of w equal to 1.
Minimum variance drops mu: minimise w' Sigma w, so w is proportional to Sigma inverse times a vector of ones.
lambda is risk aversion. Sample means are noisy.
  • Portfolio
  • Stocks · Multi-asset
  • Public formula

ClaudeAsk Claude to solve a three-asset minimum-variance example from a covariance you paste.

57
Share

A short call spread and a short put spread, opened together for a credit. Both wings have to be in place or the loss is not capped.

Short call at Kc1, long call at Kc2 above it.
Short put at Kp1, long put at Kp2 below it.
Credit C is the net premium.
Max profit = C
Max loss = the wider wing minus C
  • Options
  • Options
  • Public formula

ClaudeAsk Claude to fill max profit and max loss from four strikes and a credit you provide.

58
Share

Long a later option and short a nearer option at the same strike. The position is about time and the two implied volatilities, not about direction alone.

Same strike and type.
Long the far expiry. Short the near expiry.
Value moves with the near option's faster decay and with the gap between the two implied vols.
There is no closed-form edge. The definition is the position.
  • Options
  • Options
  • Public formula

ClaudeAsk Claude to state what happens to the position if near implied vol rises and far implied vol does not.

59
Share

Own the stock and sell a call. The premium is income, and the stock's upside above the strike is given away.

Hold the shares. Sell a call struck at K for premium C.
If expiry price S <= K: result = S - entry + C
If S > K: result = K - entry + C
Loss if the stock falls by more than C.
  • Options
  • Options · Stocks
  • Public formula

ClaudeAsk Claude to compute the expiry result at three prices you choose, including one far below the entry.

60
Share

The exchange's index version of a covered call on the S&P 500. The roll rule is Cboe's, and it is on the methodology page.

Long the S&P 500.
Each roll, sell the listed call that Cboe's rule selects, near one month and near the money.
Do not substitute a homemade strike rule and still call it BXM.
The dashboard links the methodology.
  • Options
  • Options · Stocks
  • Public formula

ClaudeAsk Claude to restate Cboe's roll in one sentence after you paste the methodology paragraph.

61
Share

The exchange index that sells a near one-month S&P 500 put and holds collateral. Again the roll is Cboe's rule.

Sell the put that the PUT methodology selects.
Hold the collateral the methodology specifies.
Max gain on the option is the premium. The loss if the index falls is not capped by the premium.
Read the collateral rule on Cboe's page rather than assuming cash.
  • Options
  • Options
  • Public formula

ClaudeAsk Claude to separate the premium received from the collateral yield in a description you paste.

62
Share

Own the stock and own a put. Downside below the strike is transferred to the put. The premium is what you pay for that.

Hold the shares. Buy a put struck at K for premium P.
Expiry result = S - entry + max(K - S, 0) - P
Below K, further drops in the stock are offset by the put, before the premium.
  • Options
  • Options · Stocks
  • Public formula

ClaudeAsk Claude to find the worst expiry result of this position from K, P and the entry you give.

63
Share

For a cash acquisition, the spread is the offer minus the market price. The loss if the deal breaks is not in that subtraction.

Spread = offer - price
A rough annualised figure = (spread / price) * (365 / days to the expected close)
If the deal breaks, the loss is about price minus whatever the stock is worth alone.
That standalone value is an estimate, not a term in the spread.
  • Factor
  • Stocks
  • Public formula

ClaudeAsk Claude to annualise a spread from an offer, a price and a date, and then list what the formula leaves out.

64
Share

Long a convertible bond and short the shares that hedge its equity option. The credit of the issuer is still yours.

Long the convertible.
Short delta shares, where delta is the bond's equity sensitivity.
Rebalance the share hedge as delta moves.
The stock short does not hedge default.
  • Options
  • Bonds · Stocks
  • Public formula

ClaudeAsk Claude to explain a hedge for a delta you provide, and name the risk the shares do not cover.

65
Share

The futures price versus the cost of holding the basket. You trade only if the gap is larger than the costs of doing it.

Fair future F = S * exp((r - q) * T)
S is the basket, r financing, q dividends, T the year-fraction.
Edge = quoted future - fair future, after commissions, borrow and slippage.
Most apparent gaps are smaller than those costs.
  • Execution
  • Futures · Stocks
  • Public formula

ClaudeAsk Claude to compute a fair future from inputs you type and subtract a cost number you also type.

66
Share

Three quotes that imply two different prices for the same cross. After spreads, the gap is usually gone.

Implied A/C = (A/B) * (B/C)
Compare with the quoted A/C.
Trade only if the difference exceeds the round trip in spreads.
Use the side of each quote you would actually hit.
  • Execution
  • Forex
  • Public formula

ClaudeAsk Claude to check three quotes you paste, using the bid or ask you would trade, not the mid.

67
Share

Buy the asset, short the rich future, and hold to convergence. Contango means the future is above spot. That fact alone is not a profit.

Rich future: quoted F > S * exp((r + storage - convenience) * T)
Cash-and-carry: buy spot, short the future, finance the position.
Reverse cash-and-carry needs a borrow of the asset.
P&L is the gap minus financing, storage and fees.
  • Crypto
  • Futures · Crypto
  • Public formula

ClaudeAsk Claude to test one future against the fair level using a rate you supply, and include a fee.

68
Share

The part of a futures return that comes from rolling a position along the curve, separate from the move in the underlying.

For a long roll, an approximate yield is (near - farther) / farther.
In contango that term is negative for a long.
The spot move is a different term and can dominate.
The sign flips if you are short.
  • Factor
  • Futures · Crypto
  • Public formula

ClaudeAsk Claude to split a hypothetical futures return into spot change and roll, from two prices you give.

69
Share

Invest a fixed amount of cash on a schedule. You buy more shares when the price is lower. It is a timing plan, not an increase in expected edge.

Each date, shares bought = C / P_t
Average cost = total cash invested / total shares
C is the fixed cash amount.
With a positive expected return, investing the cash immediately has the higher expected ending wealth. Averaging changes the path and the regret of one print.
  • Portfolio
  • Stocks · Crypto
  • Public formula

ClaudeAsk Claude to compute shares bought and average cost from a list of prices and a fixed C.

70
Share

A historical pattern in which November-through-April equity returns beat May-through-October in many samples. A calendar is not a mechanism.

Hold the equity index from November through April.
Hold cash or bonds from May through October.
Bouman and Jacobsen documented the gap. Later samples are not a promise that it repeats.
The switch dates are part of the definition.
  • Calendar
  • Stocks
  • Public formula

ClaudeAsk Claude to tag each month in a return series you paste as in-season or out, and average the two groups.

71
Share

Small stocks showed higher average January returns in older US samples. Later work finds the gap smaller or gone.

Compare the January return of a small-cap portfolio with its other months.
The original evidence is in US small stocks, not in a single large stock's January.
Treat a recurrence as a hypothesis, not as a schedule.
  • Calendar
  • Stocks
  • Public formula

ClaudeAsk Claude to test the gap on a series you paste and say how many Januarys are in the sample.

72
Share

Double the stake after every loss. This is here as a warning. A finite bankroll hits zero in a fair game if the doubling continues.

After n losses, the next stake is f_n = 2^n * f_0
A win recovers the losses plus the original stake, if you can post the next stake.
With a finite bankroll the probability of eventually being unable to post it is 1 in a fair or losing game.
  • Portfolio
  • Multi-asset
  • Public formula

ClaudeAsk Claude to show the stake after eight losses from a starting f_0, and the bankroll that would already be gone.

This is not a strategy to run. It is the standard example of a staking plan with no edge.

73
Share

A duration-neutral trade on the gap between two yields. The weights match DV01 so a parallel move does not dominate.

Pick two maturities.
Choose futures counts so N_a * DV01_a = N_b * DV01_b
A steepener profits if that yield spread widens, with the sign set by which leg is long.
DV01 is the dollar change for one basis point.
A flattener is the opposite position.
  • Portfolio
  • Bonds · Futures
  • Public formula

ClaudeAsk Claude to size two DV01s you provide so the book is flat to a parallel one-basis-point move.

74
Share

The shape of the VIX futures curve versus spot VIX. Being short the front future in contango collects a gap that can be wiped out without a cap when volatility jumps.

Contango: front future above spot VIX.
A short roll earns the gap only if the curve does not reprice up.
The loss on a naked short volatility position is not bounded by the premium or the gap.
Cboe publishes the curve. The trade is a description of that shape, not a recommendation.
  • Options
  • Futures · Options
  • Public formula

ClaudeAsk Claude to describe a curve you paste as contango or backwardation and state the unbounded loss of being short.

A short-volatility position can lose more than the capital you planned to use.

75
Share

When a perpetual's funding is persistently positive, shorts receive it. The hedge is long the same economic exposure in spot. Venue conventions differ.

On venues where a positive rate means longs pay shorts:
A long perp pays about position * funding rate.
The carry book is short the perp and long spot, or the reverse when the rate is negative.
The link is Hyperliquid's definition. Read the sign on the venue you actually use.
The hedge fails if the spot and the perp are not the same exposure.
  • Crypto
  • Crypto
  • Public formula

ClaudeAsk Claude to compute one funding payment from a rate and a position, using the sign convention of the docs.

76
Share

A weekly positioning report. A fade treats an extreme speculative net position as crowded. Extremes can stay extreme.

Net speculative = non-commercial long contracts - non-commercial short contracts.
Express that net as a percentile of its own history.
The cutoff percentile is a choice you must write down.
The report is weekly and published with a lag.
  • Calendar
  • Futures
  • Public formula

ClaudeAsk Claude to compute a percentile from a history you paste and refuse to pick the cutoff for you.

77
Share

A market-making reservation price that moves against your inventory, plus a spread that depends on volatility and how fast orders arrive.

Reservation price r = s - q * gamma * sigma^2 * (T - t)
s is the mid, q is inventory, gamma is risk aversion, sigma is volatility, T - t is time left.
The optimal half-spread is the extra term in the paper. It widens with volatility and narrows when arrivals are frequent.
Use the paper's spread, not a guessed multiple.
  • Execution
  • Stocks · Futures · Crypto
  • Public formula

ClaudeAsk Claude to move the reservation price for an inventory you set, and to quote the spread formula from the paper rather than invent it.

78
Share

A closed-form approximation of the same inventory problem, used when you want quotes without solving the control equation numerically.

The reservation price shifts against inventory, as in Avellaneda-Stoikov.
The optimal spread is a function of volatility, risk aversion and the arrival intensity.
The exact expression is equation set in the arXiv paper. Implement that expression rather than a linear guess.
  • Execution
  • Stocks · Futures · Crypto
  • Public formula

ClaudeAsk Claude to identify the inventory term and the intensity term in the paper's formula before writing code.