Sample note · stocks library
~/vault/learning/stocks/0dte_iron_fly_filter.md
---
name: 0dte_iron_fly_filter
description: Filter to enter SPY 0DTE iron flies only when IV-rank is high
and overnight gap is below 0.4 sigma.
type: pattern
confidence: 0.78
last_verified: 2026-04-22
source_url:
- https://www.tastylive.com/shows/option-jive/episodes/0dte-mechanics
- vault://memory/options_0dte_research.md
decay_days: 45
contradicts: []
---
# 0DTE iron-fly entry filter
Enter only when:
- IV-rank > 35 on SPY
- overnight ES gap < 0.4 sigma vs 20-day realised
- VIX term-structure in contango (no kink at front month)
Skip when:
- FOMC, CPI, NFP, or large earnings within 6 hours
- prior session closed at > 1.2 sigma move
Backtest on file: 2018-01 to 2026-03, win-rate 71.4%,
expectancy +$0.18 per dollar of max risk.
Distillation prompt · qwen3-coder:30b
scripts/distill.py · ~75 lines around the prompt template
# Run with Ollama via subprocess; no API key, no network.
PROMPT = """You are the Volia Brain distiller.
Input is a long-form artifact (transcript, article, paper).
Your job is to produce a memory note in this exact YAML+markdown shape:
---
name: <snake_case slug, <= 6 words>
description: <one-sentence claim, falsifiable>
type: pattern | finding | hypothesis | decision
confidence: <0.0 - 1.0, calibrated; default 0.6 unless explicit>
last_verified: <today, ISO date>
source_url: [<list of URLs and vault://paths>]
decay_days: <estimate of how soon to re-verify>
contradicts: [<slugs of any claims this challenges>]
---
# <heading>
3-7 bullet points. Be concrete, name numbers, name dates.
NEVER hedge with 'might' or 'could'. State the claim, then
state the conditions under which it would be false.
If the input contains a strategy: add a 'when to skip' list.
If it cites data: include the dataset window and sample size.
If it overlaps an existing memory, set 'contradicts' or merge.
"""
def distill(text):
out = ollama.generate("qwen3-coder:30b", PROMPT + text)
note = parse_yaml_md(out)
embed = ollama.embed("nomic-embed-text", note.body)
db.upsert(note, embed)
classify_and_route(note) # deepseek-r1:8b decides library
detect_contradictions(note) # claim-graph diff
return note