Skip to content

CondorCommodore/gamma-scalp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gamma Math-Only Core

Attribution: Discord Salsaman1007 and GitHub CondorCommodore. License: MIT.

A compact gamma scalp model centered on:

  • Black-Scholes straddle math
  • Portfolio delta from straddle plus MES hedge
  • Threshold-based hedge decisions
  • SML anchor leaning
  • SAL halt/resume behavior

Files

  • gamma-math-only.ts: the shareable core
  • gamma-math-only-smoke.ts: a minimal smoke test
  • package.json: minimal setup for running the smoke test

Usage

Import the core and initialize it with a first price tick:

import { createGammaMathOnly } from "./gamma-math-only.js";

const model = createGammaMathOnly({
  iv: 0.19,
  straddleQuantity: 2,
  deltaThreshold: 0.1,
  rehedgeThreshold: 0.1,
  hedgeAmplifier: 1,
  minHedgeContracts: 1,
  optionStrikeIncrement: 5,
  optionUnderlyingScale: 1,
  spxMultiplier: 100,
  mesPointValue: 5,
  overshootTarget: 0.8,
  anchorLevel: 6450,
  anchorRadius: 40,
  salLevel: 6500,
});

model.init({ tick: 1, tsMs: Date.now(), mid: 6450 });
const event = model.processTick({ tick: 2, tsMs: Date.now() + 1000, mid: 6490 });

If event is non-null, the model thinks a hedge should occur. The event includes:

  • hedgeDirection
  • hedgeContracts
  • portfolioDeltaBefore
  • portfolioDeltaAfter
  • targetDelta

Smoke Test

Run:

npm install
npm run smoke

This verifies threshold behavior, SML leaning, and SAL halt/resume.

About

Compact gamma scalp core with SAL/SML anchoring and smoke test

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors