Sleep Money Maker (@SleepMoneyMaker) header
Sleep Money Maker (@SleepMoneyMaker) profile picture

Ph.D. 20+ years building AI to see patterns humans miss. Pointed one at the options market. I post what it finds, how AI improves it, and weekly results.

More data (free) 👉
Joined June 2021
Photo by Sleep Money Maker (@SleepMoneyMaker)Photo by Sleep Money Maker (@SleepMoneyMaker)Photo by Sleep Money Maker (@SleepMoneyMaker)Photo by Sleep Money Maker (@SleepMoneyMaker)Photo by Sleep Money Maker (@SleepMoneyMaker)Photo by Sleep Money Maker (@SleepMoneyMaker)Photo by Sleep Money Maker (@SleepMoneyMaker)Photo by Sleep Money Maker (@SleepMoneyMaker)Photo by Sleep Money Maker (@SleepMoneyMaker)Photo by Sleep Money Maker (@SleepMoneyMaker)
Human behavior never changes. Markets drop, people panic and people chase the next shiny thing. The few who stick with a boring process get paid. One of them just bought a full year of my options trading system.
2
494
Put sellers, save this: a free check on how far a stock moved the day after each earnings report, and whether that would have hit your strike. Salesforce reports Wednesday after the close. After its May 2024 report, it fell 19.7% in one day. A Dec 4 put is still open when Thursday's reaction lands. I ran it with a $180 strike, 9.2% under Friday's $198.21 close. Its last 12 reports: → Typical next-day move: 7.3%, up or down → Up 6 times, down 6 → Biggest jump: +22.6%, after the August report → Drops deeper than the 9.2% cushion: 1 of 12 Built on yfinance, a free open-source library (Apache 2.0). It runs locally on your machine. No account, no API key. Install it with: pip install yfinance Here's the prompt: "Write and run Python code with yfinance (free Yahoo Finance data) that measures how far a stock moved the day after each of its earnings reports, and whether any of those moves would have gone past my put strike. Setup: pip install yfinance Ticker: [TICKER]. My put strike: $[STRIKE]. My put expires on: [EXPIRY]. Number of past reports: [COUNT] (12 if left blank). 1. Earnings dates. Get yfinance's earnings dates table for the stock with get_earnings_dates(limit=[COUNT] + 12). Convert every timestamp to New York time. If two rows share the same date, keep only the first one as listed. Now = the current New York date and time. - Past reports: rows dated before now that have a Reported EPS value. Keep the latest [COUNT]. List any row dated before now with no Reported EPS, and not older than the oldest kept report, as "skipped, no EPS". - Next report: the earliest row dated at or after now. If there is none, say "next date not listed". 2. Price history. Ask yfinance for daily bars of the stock starting 30 days before the oldest kept report and ending on today's New York date plus 1 day (the end date is exclusive, so today is covered), with auto_adjust=False. Work only with Close, which is adjusted for splits but not for dividends (ignore Adj Close). Remove bars with an empty Close. If the newest bar is today's and it is not yet 16:15 in New York, remove it too, since that session is unfinished. [LAST] = the newest remaining bar's date, [PRICE] = its Close. 3. Reaction day for each report, using Yahoo's listed time: - time before 16:00 (before or during market hours): reaction day = the first session on or after the report date; base day = the session just before the reaction day. - time at 16:00 or later (after the close): reaction day = the first session after the report date; base day = the last session on or before the report date. Move = Close on reaction day / Close on base day - 1. If the reaction day is not in the price data yet, skip that report and say so. 4. Cushion % = 100 x (1 - [STRIKE] / [PRICE]) (negative if the strike is above the price). A move "went past the strike" when it is minus the cushion or lower: with a 9.0% cushion, a -9.0% move counts, -8.9% does not. Do not run this test when [STRIKE] is at or above [PRICE]. 5. Next report vs my put: work out its reaction day the same way as in step 3, counting Monday to Friday as sessions (ignore holidays). If that day is on or before [EXPIRY], the put is open through the report. If the report itself is after [EXPIRY], it is not. Otherwise (report on or before [EXPIRY] but reaction day after it), say "reaction lands after expiry". 6. Show me: - [LAST], [PRICE] and the cushion % (1 decimal) - next report: date, before or after the close, and the step 5 answer - a table, one row per report, newest first: report date, before/after the close, base Close, reaction Close (2 decimals), move in % (1 decimal), and a mark if it went past the strike - how many moves were up (above 0) and how many were down (0 or below) - typical move size = plain average of the moves ignoring their sign, in % (1 decimal) - biggest drop and biggest jump: report date and move (for both, the newest one if tied) - how many moves went past the strike, out of how many reports used 7. Finish with one verdict line, using the first rule that fits: - [STRIKE] >= [PRICE]: "Your strike sits at or above the latest close" - at least one move went past the strike: "[count] of the last [reports used] earnings moves went past this strike in one day" - otherwise: "None of the last [reports used] earnings moves reached this strike in one day; the biggest drop was [biggest drop]%" (biggest drop with 1 decimal) Compare with full-precision numbers; round only in what you show me." Repo link is in the reply.
1
181
github.com/ranaroussi/yfinan… Free under Apache 2.0, about 26k stars. The prompt uses Yahoo's listed report time to tell a before-the-open report from an after-the-close one. If a time looks off, check the company's own announcement first.
41
Flashy stocks don't always pay put sellers more. Grok Bot sold 8 puts expiring Nov 20 and closed them all early. Target paid best: it kept 0.85% and 0.77% of the cash set aside, with strikes 11.5% and 13.5% below the price. Tesla kept 0.39%, with a strike only 9% below.
1
181
Sleep Money Maker retweeted
The tell has been in the silence all along. Notice what's missing from the math drops. It would be ironic if the one problem this whole wave started with is the one they never show.
Replying to @franzbruckhoff
I’ve heard this from a few people
1
1
325
The tell has been in the silence all along. Notice what's missing from the math drops. It would be ironic if the one problem this whole wave started with is the one they never show.
Replying to @franzbruckhoff
I’ve heard this from a few people
1
1
325
Grok Bot sold a Tesla $315 put on Wednesday. By Friday, 81% of the premium was already in. Holding it to Dec 4 could add only $55 more. So it bought the put back and sold a $357.50 put for the same date, for $202. Higher strike, more risk, but far better pay for the week that was left. The takeaway for put sellers: once most of the premium is in, ask what the last few dollars are paying you to wait. This week: 2 Tesla puts sold, $497 collected 2 bought back early, +$381 realized 0 assigned, 0 expired Since Oct 8: $6,281 premium collected $255,871.16 account value at cost +$5,871.16 vs the $250k start All of it straight from the broker data.
238
Dividend investors: Altria's price rose 17.7% in 10 years. Its total return was 134.1%. This free prompt shows that split for any stock. Bookmark it before a flat chart talks you out of a dividend stock. I ran it with $10,000 in Altria, from Nov 28, 2016 to Wednesday's close: → Dividends made 86.8% of the gain → Price alone: $11,766 → Dividends reinvested: $23,409 → Yearly growth: 1.6% on price, 8.9% with dividends → Worst drop on the way: -59.6% on price, -53.7% with dividends The math runs on bt, a free open-source backtesting library (MIT), on your own machine. yfinance supplies the prices, no API key needed. One install line: pip install bt yfinance Paste this into any AI agent that can run Python: "Use Python with bt (a backtesting library) and yfinance for prices to see how much of a stock's return came from its dividends. Install with: pip install bt yfinance Stock: [TICKER]. Years back: [YEARS] (use 10 if I leave it blank). Starting amount: [AMOUNT] dollars (use 10000 if I leave it blank). 1. Dates. Today = today's date in New York time. [START] = the same month and day [YEARS] years before today (if that is Feb 29, use Feb 28). 2. Prices. Download daily prices with yfinance from [START] with end = today and auto_adjust=False. Then drop any row dated today or later, so only sessions that finished before today count (on an early-close day, today's session is skipped too). Keep two columns: Close (split-adjusted, dividends not added) and Adj Close (Yahoo's close adjusted for splits and dividends; holding it works like reinvesting each dividend on its ex-date). Drop rows where either is missing. [FIRST] = first remaining date, [LAST] = last remaining date. If [FIRST] is more than 7 days after [START], say the stock has less history than I asked for. 3. Run two bt backtests on these rows with the same strategy: buy once on [FIRST] with all the money and hold, never rebalance (bt's RunOnce, SelectAll, WeighEqually and Rebalance algos), initial capital [AMOUNT], integer_positions=False, no fees. Backtest A uses Close ("price only"). Backtest B uses Adj Close ("dividends reinvested"). 4. For each backtest, use its daily portfolio value from [FIRST] to [LAST]: - end value = the value on [LAST] - total return = end value / [AMOUNT] - 1 - yearly growth (CAGR) = (end value / [AMOUNT]) ^ (365.25 / calendar days from [FIRST] to [LAST]) - 1 - worst drop = the lowest value of (value / highest value so far - 1) 5. Dividend part = B's end value - A's end value. Gain = B's end value - [AMOUNT]. If the gain is above 0, dividend share = dividend part / gain x 100, in % (it is above 100% when the price alone lost money). If the gain is 0 or below, dividend share = n/a. 6. Report: - [FIRST] and [LAST], with Close and Adj Close on both dates (2 decimals) - for A and B: end value in dollars (0 decimals), then total return, CAGR and worst drop in % (1 decimal) - dividend part in dollars (0 decimals) and dividend share in % (1 decimal) 7. Verdict, exactly one line, the first that applies: - the gain is 0 or below: "Even with dividends reinvested, this lost money" - A's total return is 0 or below: "The price alone lost money; dividends did all the earning" - dividend share is 50% or more: "Dividends did most of the earning" - otherwise: "The price did most of the earning; dividends added [dividend share]% of the gain" Use unrounded values for every comparison and round only when showing." bt's GitHub page is in the reply.
1
2
316
github.com/pmorissette/bt Free under MIT, from the same developer as this morning's ffn. Two buy-and-hold backtests, one on Close and one on Adj Close, produce the Altria split. Works for any dividend stock or ETF.
71
Sleep Money Maker retweeted
Put sellers: "it always comes back" leaves out how long. This free prompt puts a number on it. Bookmark it before your next put on a stock you'd hold through a slump. I ran it on Johnson & Johnson with a $245 strike, 10.6% under Wednesday's $273.94 close. Its deepest drop, -27.8% in 2020, was back at the old high in 54 sessions. A milder -23.6% slide took 862. What the prompt found in 10 years of daily closes: → 7 drops of 10.6% or more, all 7 recovered → 2 of the 7 kept it under its high for about two years or longer → Longest: 862 sessions, April 2022 to October 2025 → Typical (median): 156 sessions under the old high → Today: 4.1% below its November 13 high Runs on quantstats: free and open source (Apache 2.0), on your own computer. Prices come from yfinance, no API key. One install line: pip install quantstats yfinance Here's the prompt: "Use Python with the quantstats package (portfolio analytics) and yfinance for prices to check how long a stock has taken to climb back to its old high after drops at least as deep as my put's cushion. Install with: pip install quantstats yfinance Stock: [TICKER]. Put strike I'm weighing: [STRIKE] dollars. History: [YEARS] years (use 10 if I leave it blank). 1. Dates. Today = today's date in New York time. [START] = the same month and day [YEARS] years before today (use the 28th if that day doesn't exist). 2. Prices. Download daily prices with yfinance from [START] to today (pass end = today plus 1 day so today is included), auto_adjust=False. Use the Close column (split-adjusted, dividends not added back), not Adj Close. Drop rows with no Close. Keep only completed sessions: if the last row is dated today and New York time is before 16:15, drop that row. [LAST] = date of the last remaining row. [PRICE] = its Close. 3. Cushion = (1 - [STRIKE] / [PRICE]) x 100, in %. 4. Drops. Pass the Close series itself (prices, not returns; fine for any price above $1) to quantstats' to_drawdown_series. For every session that gives Close / highest Close so far - 1, where the first Close in the window counts as the first high. Then pass that series to quantstats' drawdown_details. Each row is one drop: start = first session below the old high, valley = lowest session, end = last session still below the old high, max drawdown = depth in % (negative). 5. Keep only drops whose max drawdown is at or below minus the cushion (for example -10.6% or deeper when the cushion is 10.6%). For each kept drop, counting sessions as rows of the price table (not calendar days): - old high = the session right before start, with its Close - bottom = the valley date and the max drawdown - recovered on = the session right after end (its Close is back at or above the old high). Exception: if end is [LAST] and the drawdown on [LAST] is below 0, the drop is still open. - sessions underwater = row position of recovered on minus row position of the old high. For an open drop, use [LAST] instead and mark it "so far". 6. Report: - [LAST], [PRICE] and the cushion (1 decimal) - a table of kept drops: old high date and Close, bottom date, depth (1 decimal), recovered on (or "still open"), sessions underwater - how many drops were kept and how many recovered - median sessions underwater across recovered drops (a half value is fine), and the longest recovered one with its old high and recovered-on dates (earliest if tied) - the deepest kept drop: depth, old high date and bottom date (earliest if tied) - right now: the drawdown on [LAST] in % (1 decimal) and the date of the last session at the high (the last session where the drawdown was 0) 7. Verdict, exactly one line, the first that applies: - a kept drop is still open: "Still below its [old high date] high after [sessions underwater] sessions" - no recovered drops: "No completed drop this deep since [START]" - median sessions underwater of 126 or fewer: "Usually back at its high within about six months" - otherwise: "Usually takes more than six months to get back" Use unrounded values for every comparison and round only when showing." Grab the quantstats repo from the first reply.
1
1
2
329
Furthest OTM puts that still pay, Dec 4 expiry. $MRNA $CAR $PANW $ANF $TSLA $HPQ $GAP $TOST Avg premium 0.74%. Avg cushion 8.1%. Median cushion is 7.4% below spot.
245
A wider cushion didn't make Grok Bot's puts safer. The 8 that ended in assignment or a losing roll were sold about 9.8% below the stock price on average. The 27 it closed early for a profit were sold only 8.6% below. One Moderna put sold almost 15% below the price was still assigned 4 days later.
2
268
Put sellers: Oracle ended December lower in 9 of the last 10 years. This free prompt checks any stock, any month. Bookmark it before you sell a put that runs into December. I ran it with a $95 strike, 8.5% under Oracle's $103.88 close on Wednesday. The only up December was 2020, at +12.1%. What 10 Decembers of Oracle closes showed: → Typical (median) December: -4.1% → Worst: -9.8% in 2024 → Deepest dip inside the month: -13.7% in 2023 → Ended deeper than the 8.5% cushion: 2 of 10 → Dipped past it at some point: 4 of 10 Runs on ffn, a free open-source finance library (MIT), on your own computer. Prices come from yfinance, no API key. Setup is a single pip line: pip install ffn yfinance Here's the prompt: "Use Python with the ffn package (performance stats) and yfinance for prices to check how a stock has behaved in one calendar month over past years, and whether those months would have reached my put strike. Install with: pip install ffn yfinance Stock: [TICKER]. Put strike I'm weighing: [STRIKE] dollars. Month: [MONTH] (use the next calendar month if I leave it blank). History: [YEARS] years (use 10 if I leave it blank). 1. Which months. Today = today's date in New York time. Use the last [YEARS] times [MONTH] fully ended before today, meaning its last calendar day is before today (if today is inside [MONTH], this year's does not count). Call the oldest one [FIRST]. [START] = the 1st day of the month before [FIRST]. 2. Prices. Download daily prices with yfinance from [START] to today (pass end = today plus 1 day so today is included), auto_adjust=False. Use the Close column (split-adjusted, dividends not added back), not Adj Close. Drop rows with no Close. Keep only completed sessions: if the last row is dated today and New York time is before 16:15, drop that row. [LAST] = date of the last remaining row. [PRICE] = its Close. 3. Cushion = (1 - [STRIKE] / [PRICE]) x 100, in %. 4. Month returns. Pass the Close series to ffn's calc_stats and read its return_table (rows = years, columns Jan to Dec plus YTD). For each chosen year, the [MONTH] value is: last Close of [MONTH] / last Close of the month before - 1. Use only years where the month before [MONTH] has at least one Close in the data and [MONTH] itself has at least one Close; skip any other year and say which. 5. Dip inside the month. For each chosen year, from the same Close series: dip = lowest Close on any session in [MONTH] / last Close of the month before - 1; if that comes out above 0, use 0. 6. Strike test (skip it if [STRIKE] is at or above [PRICE]). A month "closed past the strike" if its return is at or below minus the cushion (for example -8.0% or worse when the cushion is 8.0%). A month "dipped past the strike" if its dip is at or below minus the cushion. 7. Report: - [LAST], [PRICE] and the cushion (1 decimal) - a table, one row per year: [MONTH] return in % and dip in % (1 decimal), plus a mark if it closed or dipped past the strike - how many of the years were up (return above 0) and how many were down (0 or below) - median (average of the two middle values when the count is even) and plain average of the [MONTH] returns, in % (1 decimal) - worst [MONTH]: year and return; deepest dip: year and dip (for both, the earliest year if tied) - how many years closed past the strike, and how many dipped past it 8. Verdict, exactly one line, the first that applies: - [STRIKE] is at or above [PRICE]: "Strike is at or above the last close" - at least one year closed past the strike: "In [count] of [years used] years, [MONTH] ended past this strike" - at least one year dipped past the strike: "[MONTH] never ended past this strike, but dipped past it in [count] of [years used] years" - otherwise: "[MONTH] never reached this strike in [years used] years" Use unrounded values for every comparison and round only when showing." The ffn repo is one tap away in the reply.
1
3
409
Wheel traders: a free way to know if your put strike is out of reach of the stock's normal swing before expiry. Bookmark it for the next time you're torn between two strikes. I ran it on AMD: a $360 put expiring Dec 18, 11.3% under Wednesday's $406.03 close. That cushion still sits inside a normal move. At its current swing pace, the model puts the odds of AMD finishing under $360 at 26.7%. The last 5 years alone would say 16.8%. What it told me on AMD: → Swing pace right now: 91.3% a year → Its long-run pace: 59.3% a year → Expected move by Dec 18: 19.3% → One-sigma low: $334.76, under the strike → Verdict: inside a normal move to expiry Runs on arch, a free open-source volatility library, on your own computer. Prices come from yfinance, no API key. Setup is one command: pip install arch yfinance pandas_market_calendars Here's the prompt: "Use Python with the arch package (volatility models), yfinance for prices and pandas_market_calendars for the trading calendar to check how far a stock is likely to swing before my put expires, and where my strike sits in that range. Install with: pip install arch yfinance pandas_market_calendars Stock: [TICKER]. Put strike: [STRIKE] dollars. Expiration date: [EXPIRY]. History: [YEARS] years (use 5 if I leave it blank). 1. Dates. Today = today's date in New York time. [START] = the same month and day [YEARS] years before today (use the 28th if that day doesn't exist). 2. Prices. Download daily prices with yfinance from [START] to today (pass end = today plus 1 day so today is included), auto_adjust=False. Use the Close column (split-adjusted, dividends not added back), not Adj Close. Drop rows with no Close. Keep only completed sessions: if the last row is dated today and New York time is before 16:15, drop that row. [LAST] = date of the last remaining row. [PRICE] = its Close. 3. Sessions left. If [EXPIRY] is on or before [LAST], stop and say the expiration is not after [LAST]. Otherwise [H] = the number of NYSE trading days after [LAST] up to and including [EXPIRY] (pandas_market_calendars, calendar "NYSE", valid_days; half days count as full sessions). 4. Model. Daily returns r = 100 x ln(Close / previous Close), one per session (the first session has none). Fit arch_model(r, mean="Constant", vol="GARCH", p=1, q=1, dist="normal") with fit(disp="off"). Read mu, omega, alpha[1] and beta[1]. 5. Expected swing. Call forecast(horizon=[H], reindex=False) on the fit and take the last row of variance (one value per session ahead, starting with the session after [LAST]). Swing = square root of the sum of those [H] values, divided by 100 (a log move; ignore mu here). One-sigma low = [PRICE] x exp(-swing). Two-sigma low = [PRICE] x exp(-2 x swing). 6. Strike vs swing. Sigmas = ln([STRIKE] / [PRICE]) / swing (negative when the strike is below the close). Model odds of finishing below the strike = standard normal CDF of sigmas, in %. 7. History check. For every row t that has a row t + [H] in the table (rows, not calendar days), compute Close at t + [H] / Close at t. History odds = share of those rows where that ratio is at or below [STRIKE] / [PRICE], in %, plus the counts (hits / rows checked). 8. Calm or wild. Vol now = square root of the first forecast value (the session after [LAST]) x square root of 252, in % a year. Long-run vol = square root of (omega / (1 - alpha[1] - beta[1])) x square root of 252, in % a year, only if alpha[1] + beta[1] is below 1; otherwise say "no long-run level". Say "calmer than usual" if vol now is below long-run vol, otherwise "wilder than usual" (skip this when there is no long-run level). 9. Report: - [LAST], [PRICE], [H], and the strike's distance below [PRICE] in % ((1 - [STRIKE] / [PRICE]) x 100, 1 decimal) - mu, omega, alpha[1], beta[1] (4 decimals) - swing in % (swing x 100, 1 decimal), one-sigma low and two-sigma low in dollars (2 decimals) - sigmas (2 decimals) and model odds (1 decimal) - history odds (1 decimal) with hits / rows checked - vol now and long-run vol (1 decimal) and calm or wild 10. Verdict, exactly one line, the first that applies: - [STRIKE] is at or above [PRICE]: "Strike is at or above the last close" - sigmas above -1: "Strike sits inside a normal move to expiry" - sigmas above -2: "Strike sits past a normal move but inside a rough one" - otherwise: "Strike sits beyond a two-sigma move to expiry" Use unrounded values for every comparison and round only when showing." Source code for arch is in the reply.
2
1
2
308
github.com/bashtage/arch Open source (NCSA license) and maintained since 2014. It fits the GARCH model behind the swing forecast. Plug in your own ticker, strike and expiry date.
62
Closing a put early does more than lock in profit. In October, Grok Bot took profits early on 15 put trades. 4 of them would have finished in the money and turned into shares if it had held to Friday. Instead, those 4 still made $582.
1
1
178
Put sellers: "it always comes back" leaves out how long. This free prompt puts a number on it. Bookmark it before your next put on a stock you'd hold through a slump. I ran it on Johnson & Johnson with a $245 strike, 10.6% under Wednesday's $273.94 close. Its deepest drop, -27.8% in 2020, was back at the old high in 54 sessions. A milder -23.6% slide took 862. What the prompt found in 10 years of daily closes: → 7 drops of 10.6% or more, all 7 recovered → 2 of the 7 kept it under its high for about two years or longer → Longest: 862 sessions, April 2022 to October 2025 → Typical (median): 156 sessions under the old high → Today: 4.1% below its November 13 high Runs on quantstats: free and open source (Apache 2.0), on your own computer. Prices come from yfinance, no API key. One install line: pip install quantstats yfinance Here's the prompt: "Use Python with the quantstats package (portfolio analytics) and yfinance for prices to check how long a stock has taken to climb back to its old high after drops at least as deep as my put's cushion. Install with: pip install quantstats yfinance Stock: [TICKER]. Put strike I'm weighing: [STRIKE] dollars. History: [YEARS] years (use 10 if I leave it blank). 1. Dates. Today = today's date in New York time. [START] = the same month and day [YEARS] years before today (use the 28th if that day doesn't exist). 2. Prices. Download daily prices with yfinance from [START] to today (pass end = today plus 1 day so today is included), auto_adjust=False. Use the Close column (split-adjusted, dividends not added back), not Adj Close. Drop rows with no Close. Keep only completed sessions: if the last row is dated today and New York time is before 16:15, drop that row. [LAST] = date of the last remaining row. [PRICE] = its Close. 3. Cushion = (1 - [STRIKE] / [PRICE]) x 100, in %. 4. Drops. Pass the Close series itself (prices, not returns; fine for any price above $1) to quantstats' to_drawdown_series. For every session that gives Close / highest Close so far - 1, where the first Close in the window counts as the first high. Then pass that series to quantstats' drawdown_details. Each row is one drop: start = first session below the old high, valley = lowest session, end = last session still below the old high, max drawdown = depth in % (negative). 5. Keep only drops whose max drawdown is at or below minus the cushion (for example -10.6% or deeper when the cushion is 10.6%). For each kept drop, counting sessions as rows of the price table (not calendar days): - old high = the session right before start, with its Close - bottom = the valley date and the max drawdown - recovered on = the session right after end (its Close is back at or above the old high). Exception: if end is [LAST] and the drawdown on [LAST] is below 0, the drop is still open. - sessions underwater = row position of recovered on minus row position of the old high. For an open drop, use [LAST] instead and mark it "so far". 6. Report: - [LAST], [PRICE] and the cushion (1 decimal) - a table of kept drops: old high date and Close, bottom date, depth (1 decimal), recovered on (or "still open"), sessions underwater - how many drops were kept and how many recovered - median sessions underwater across recovered drops (a half value is fine), and the longest recovered one with its old high and recovered-on dates (earliest if tied) - the deepest kept drop: depth, old high date and bottom date (earliest if tied) - right now: the drawdown on [LAST] in % (1 decimal) and the date of the last session at the high (the last session where the drawdown was 0) 7. Verdict, exactly one line, the first that applies: - a kept drop is still open: "Still below its [old high date] high after [sessions underwater] sessions" - no recovered drops: "No completed drop this deep since [START]" - median sessions underwater of 126 or fewer: "Usually back at its high within about six months" - otherwise: "Usually takes more than six months to get back" Use unrounded values for every comparison and round only when showing." Grab the quantstats repo from the first reply.
1
1
2
329
Sleep Money Maker retweeted
If you sell puts, here's a free way to know if insiders are buying the stock you might end up owning. Worth keeping for your next strike pick. Intel's CEO bought $9.71 million of Intel stock on the open market on Nov 2. In the last 90 days of SEC filings, no Intel insider sold a single share on the market. → 150,000 shares bought by CEO Lip-Bu Tan → average price paid $64.73 → $0 of open-market insider sales → 2 insider filings (Form 4) in 90 days → 80,237 shares withheld for tax by another executive, which look like selling but aren't Runs on edgartools: free, open source (MIT), no API key. The SEC only asks for your name and email. One install: pip install edgartools Here's the prompt: "Use the edgartools Python package (you import it as edgar) to check insider trading at [TICKER]. 1. First call set_identity("[Your Name] [your email]"). The SEC asks every user to identify themselves. No API key is needed. 2. Load the company with Company("[TICKER]") and get its filings with get_filings(form="4"). Keep only filings whose form is exactly "4" (drop "4/A" amendments) and whose filing date is between [START] and today, inclusive. Today = today's date in New York time. [START] = today minus 90 calendar days. Print [START], today and the number of filings kept. 3. Open each kept filing with its obj() method (this gives a Form 4 object) and turn its transactions into a table with to_dataframe(). Use only rows whose Transaction Type is "Purchase" or "Sale" (common stock bought or sold, not options) and whose Code is "P" (open-market purchase) or "S" (open-market sale). Ignore every other code: A (award), M (option exercise), F (shares withheld for tax), G (gift), C (conversion), J (other), and all derivative rows. 4. Dollar value of a row = Shares times Price (Price is the price per share in US dollars). If a P or S row has no price or a price of 0, leave it out of the dollar totals and say how many such rows there were. 5. Report buys (P) and sales (S) separately: number of rows, total shares (rounded to whole shares), total dollar value in millions of dollars (2 decimals), and number of different insiders (count the distinct names in the Insider column). Net insider buying = buy dollars minus sale dollars, in millions (2 decimals). 6. List every P row: insider name, position, transaction date, shares, price (2 decimals) and dollar value. 7. Count the rows with Code "F" and their total shares (rounded to whole shares). These are shares withheld to pay tax on vesting stock, not open-market sales. Flag exactly one of these: "no open-market trades" if there are no P or S rows; "insiders only selling" if there are S rows but no P rows; otherwise "insiders are net buyers" if net insider buying is 0 or above, or "insiders are net sellers" if it is below 0." The repo link is waiting in the first reply.
2
1
1
287
Equal cash across your puts isn't equal risk. This free check sizes each name by how much it really swings. Bookmark it for the next time you spread new money across tickers. I split $50,000 across 5 put names by risk, using a year of daily closes through Tuesday. Coca-Cola got 48.0% of the cash. Robinhood got 2.7%. An even split would have handed each of them 20%. What the prompt hands back for my list: → Coca-Cola, $95 strike: 2 contracts → Pfizer, $27 strike: 7 contracts → SoFi, $12 strike: 3 contracts, not the 8 an even split gives → Robinhood, volatility 71.1%: 0 contracts → Palantir: 0, its share can't cover one $150 put → $8,500 stays as spare cash Runs on PyPortfolioOpt: free and open source (MIT), on your own computer. Prices come from yfinance, no API key. One install line: pip install PyPortfolioOpt yfinance packaging "scipy<1.18" The last two avoid install errors I hit while testing. Here's the prompt: "Use Python with the PyPortfolioOpt package (portfolio optimization) and yfinance for prices to split the cash I keep for selling cash-secured puts across several stocks by risk, not evenly. Install with: pip install PyPortfolioOpt yfinance packaging "scipy<1.18" (PyPortfolioOpt 1.6.0 needs packaging but does not install it, and its HRPOpt fails on scipy 1.18). My planned puts, as ticker and strike: [TICKER 1] [STRIKE 1], [TICKER 2] [STRIKE 2], [TICKER 3] [STRIKE 3] (use every pair I list, 2 or more). Cash available: [CASH] dollars. 1. Dates. Today = today's date in New York time. [START] = today minus 365 calendar days. 2. Prices. Download daily prices for all my tickers with yfinance from [START] to today (pass end = today plus 1 day so today is included), auto_adjust=False. Use each ticker's Close column (not Adj Close). Keep only dates where every ticker has a Close. Keep only completed sessions: if the last row is dated today and New York time is before 16:15, drop that row. [LAST] = date of the last remaining row. 3. Daily returns = Close / previous Close - 1 for each ticker (drop the first row, which has no previous Close). 4. Weights. Pass the daily returns table (one column per ticker) to PyPortfolioOpt's HRPOpt (hierarchical risk parity) as returns, and call its optimize method with default settings (single linkage). Its weights add up to 1. Riskier stocks usually get less. 5. For each ticker: - [VOL] = sample standard deviation (ddof=1) of its daily returns, times the square root of 252, in % (1 decimal) - weight in % (1 decimal) - cash target = weight x [CASH] - one contract needs strike x 100 dollars of cash - contracts = cash target / (strike x 100), rounded down to a whole number - cash used = contracts x strike x 100 - equal-split contracts = ([CASH] / number of tickers) / (strike x 100), rounded down 6. Report: - [LAST] - a table: ticker, strike, [VOL], weight, cash target (nearest dollar), contracts, cash used, equal-split contracts - total cash used and cash left = [CASH] - total cash used - any ticker with 0 contracts: say "can't fit one contract at its risk share" and how much more cash target it would need (strike x 100 - cash target, nearest dollar) 7. Verdict, exactly one line: "Most cut by risk: [the ticker with the lowest weight]" with its weight vs the equal share (100 / number of tickers, in %). Use unrounded values for every calculation and round only when showing." The PyPortfolioOpt repo is one tap away in the reply.
1
3
257