Skip to content

Master your trading performance by analyzing results, tracking portfolio dynamics, and optimizing options strategies for continuous improvement.

License

r-brown/GammaLedger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

70 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎯 GammaLedger

Website License Version Last Commit Stars

GammaLedger is a desktop application for active options traders and investors who want to analyze, track, and optimize options trading strategies. Designed for sophisticated users, the app delivers flexible dashboards, local file persistence, and advanced analytics to support performance monitoring and decision-making.

πŸ€– Developer Note: AI-Generated Code Ahead!

πŸŽ‰ Welcome to the code playground where humans and AIs code together!

Much of this repo's code and documentation was generated, optimized, or refactored by cutting-edge AI models, like GPT and GitHub Copilot. It's a sandbox for experimenting with the latest in AI-assisted software development β€” from quick prototyping to full-featured performance analytics for options trading.

πŸ’‘ Contributions are always welcome! Feel free to:

  • Outsmart the bots πŸ€–πŸ§ 
  • Add your own clever tricks πŸͺ„
  • Teach the AI a thing or two πŸ§‘β€πŸ’»

Let's see who writes the next best hack β€” you, or the machine?
Pull requests, code battles, and Easter eggs encouraged! πŸ₯šπŸ”πŸ˜„

Why GammaLedger?

  • Privacy-First: Your trading data never leaves your device - no cloud storage or external servers
  • Zero Dependencies: No account registration, no subscriptions, no third-party data sharing
  • Professional Grade: Tools designed by traders, for traders with real-world experience
  • AI-Powered Insights: Built-in AI Coach to help you analyze trades and improve decision-making
  • Completely Free: Open source and freely available for non-commercial use under the AGPLv3 license

πŸ’Ό Ideal For ...

... Active Traders

  • Track complex multi-leg strategies like Spreads, Strangles, Straddles, Condors, Wheels and Poor Man's Covered Calls
  • Monitor time decay and adjustment opportunities with real-time Greeks (Delta, Gamma, Theta, Vega)
  • Automatic roll detection and grouping to track rolled positions seamlessly
  • Analyze win rates and profitability by strategy type
  • Maintain detailed trade journals for continuous improvement
  • Get AI-powered coaching and trade analysis

... Portfolio Managers

  • Consolidate options performance across multiple accounts
  • Generate client reports with detailed attribution analysis
  • Export portfolio visualizations optimized for social media sharing
  • Monitor risk exposure and position sizing
  • Track performance against benchmarks and targets

... Quantitative Analysts

  • Export data for backtesting and strategy development
  • Integrate with existing analytical workflows
  • Customize metrics and calculations
  • Build automated reporting systems

✨ Key Features

πŸ“Š Advanced Strategy Analytics

  • Multi-Strategy Support: Track complex strategies including:
    • Poor Man's Covered Call (PMCC)
    • The Wheel Strategy
    • Collar Strategies
    • Iron Condors, Bull/Bear Spreads
    • Cash-Secured Puts & Covered Calls
    • Custom multi-leg strategies
  • Performance Metrics: Cumulative P&L growth, win rates by strategy, risk-adjusted returns
  • Visual Analytics: Interactive charts for strategy performance and trend analysis
  • Greeks Monitoring: Real-time tracking of Delta, Gamma, Theta, and Vega across all positions

πŸ€– AI-Powered Trading Coach

  • Intelligent Trade Analysis: Get AI-driven insights on your options positions
  • Strategy Recommendations: Receive suggestions for trade adjustments and improvements
  • Risk Assessment: AI evaluates your position Greeks, break-evens, and assignment risks
  • Learning Assistant: Ask questions about options concepts and get instant explanations
  • Performance Coaching: Understand what's working and where to improve your trading

🏠 Local-First Data Architecture

  • Complete Privacy: All data stays on your device - no cloud storage or external servers
  • IndexedDB Integration: Persistent local storage with fast query performance
  • File System Access API: Direct file operations for import/export without browser limitations
  • Offline Capable: Nearly all features work flawlessly without an internet connection

πŸ“ˆ Unified Dashboard

  • Consolidated View: Single dashboard combining key metrics without duplication
  • Real-time Updates: Live P&L calculations and position tracking
  • Multi-timeframe Analysis: Daily, weekly, monthly, and custom date range views
  • Performance Widgets: Cumulative P&L Growth, Strategy Performance, Win Rate charts

πŸ” Powerful Trade Management

  • Multi-Leg Trade Entry: Efficiently enter complex multi-leg positions in one workflow
  • Smart Filtering: Advanced search and filter capabilities by ticker, strategy, date range
  • Automatic Roll Detection: Intelligent grouping of rolled positions to track complete trade lifecycle
  • Position Tracking: Monitor open positions with Greeks, time decay, and adjustment opportunities
  • Trade Journal: Detailed notes and analysis for each trade with markdown support
  • Performance Attribution: Understand which strategies and tickers drive your results

πŸ“€ Portfolio Sharing & Export

  • Social Media Export: Generate beautiful portfolio visualizations optimized for sharing
  • Professional Reports: Export performance summaries and trade journals
  • Flexible Data Export: OFX and JSON formats for external analysis
  • Tax Reporting: Export data in formats compatible with tax software

πŸš€ Quick Start

Option 1: Web Application (Recommended)

  1. Visit GammaLedger
  2. Click "Launch App"
  3. Choose: Create New Database or Import Existing Data
  4. Start tracking your options trades!

Option 2: Local Installation

  1. Download the latest release: Releases
  2. Extract gammaledger-<version>.zip to a folder of your choice
  3. Open index.html in Chrome, Edge, or Firefox
  4. Grant file system permissions when prompted (for import/export features)

First Time Setup

  1. Create Database: Click "New Database" to start fresh
  2. Import Trades: Use the OFX import wizard to load existing trades from your broker
  3. Revist or Merge Trades: Organize and clean up imported trades as needed
  4. Try AI Coach: Ask the AI Coach to analyze a position and get personalized insights

πŸ“– Usage Guide

Adding Your First Trade

  1. Click "Add Trade" from the dashboard
  2. Select strategy type (PMCC, Wheel, Iron Condor, etc.)
  3. Enter trade details:
    • Ticker symbol
    • Entry date and price
    • Strike prices and expiration dates
    • Premium collected/paid
  4. For multi-leg trades, use the multi-leg entry form to add all legs at once
  5. Add optional notes with Markdown support
  6. Click "Save"

Tracking Open Positions

  • View all open positions from the Dashboard
  • Monitor Greeks (Delta, Gamma, Theta, Vega) in real-time
  • Set alerts for time decay milestones
  • Track adjustment opportunities
  • Use AI Coach to analyze position risk and get recommendations

Rolling Positions

  • When you roll an option, GammaLedger automatically detects and groups the related trades
  • View complete roll history with cumulative P&L tracking
  • Understand your true break-even after multiple rolls

Analyzing Performance

  • Dashboard Tab: Overview of P&L, win rates, and active positions
  • Performance Metrics: Strategy-specific returns and attribution
  • Trade Journal: Review notes and lessons learned
  • Export Data: Download OFX or JSON for external analysis or tax reporting
  • AI Insights: Get AI-powered analysis of your trading patterns and suggestions

Sharing Your Success

  • Portfolio Export: Generate professional portfolio screenshots
  • Social Media Ready: Export performance charts optimized for LinkedIn, Twitter, etc.
  • Privacy Preserved: All exports maintain your privacy by excluding sensitive account details

πŸ“₯ Data Import/Export

Supported Import Formats

  • OFX (Open Financial Exchange): Industry-standard format from most brokers
  • JSON: GammaLedger native format for full backup

Broker OFX Export Instructions

Most major brokers support OFX export:

  • Interactive Brokers: Activity β†’ Reports β†’ Flex Queries β†’ Export as XML (OFX compatible)
  • TD Ameritrade: History & Statements β†’ Export β†’ OFX format
  • Charles Schwab: History β†’ Export β†’ OFX/QFX format
  • E*TRADE: Statements β†’ Download β†’ OFX format
  • Fidelity: Activity & Orders β†’ Download β†’ OFX/QFX format

GammaLedger automatically parses OFX files to extract:

  • Trade dates and times
  • Ticker symbols
  • Action types (Buy/Sell to Open/Close)
  • Quantities, strikes, and expirations
  • Premiums and commissions
  • Option types (Call/Put)

Export Options

  • Full Database Backup (JSON) - Complete backup with all settings and history
  • OFX Format - Export in standard OFX for import into other financial software
  • Portfolio Images - Beautiful charts ready for social media

πŸ“˜ Documentation

For comprehensive setup instructions, configuration details, and developer guides, refer to the GammaLedger Wiki.

The Wiki covers key areas, including:

  • Installation & Setup – step-by-step environment configuration and system requirements
  • Trade Import Formats – supported data sources, OFX/JSON structure, and integration workflows
  • Analytics Features – portfolio metrics, ROI calculations, and performance visualization tools
  • Contribution Guidelines – how to propose features, report issues, or submit pull requests

❓ FAQ

Is my data safe?

Yes! GammaLedger uses local-first architecture. All data is stored in your browser's IndexedDB. Nothing is sent to external servers. Your trading data never leaves your device, ensuring complete privacy.

How do I backup my data?

JSON database is already stored locally on your device. No explicit backup needed. For extra safety, consider backing up JSON file by creating a copy in cloud storage or an external drive.

Does this support futures or stocks?

Currently optimized for options trading. Stock position tracking and futures support may be added in future releases based on community demand.

Can I sync across devices?

Not automatically. For privacy and security, data is stored locally. You can manually export/import JSON backups to sync data across devices.

Is there a paid version?

GammaLedger is open source and free forever under the AGPLv3 license for non-commercial and open-source compliant use. For proprietary, commercial, or institutional applications without AGPL restrictions, a commercial license is available.

What brokers work with GammaLedger?

Any broker that exports OFX files trade logs. We have direct integration with Interactive Brokers. Other popular brokers (TD Ameritrade, Schwab, E*TRADE, Fidelity) support OFX export.

What is the AI Coach feature?

The AI Coach is an integrated assistant that analyzes your trades and provides portfolio insights, risk management, position sizing, and strategy recommendations. It helps you learn and improve your trading decisions.

How does automatic roll detection work?

When you roll an options position (close one and open another at a different strike/expiration), GammaLedger automatically detects the relationship and groups them together. This gives you accurate tracking of cumulative P&L, total credits/debits, and true break-even prices across the entire rolled position lifecycle.

Can I track options on cryptocurrencies?

Not currently. GammaLedger focuses on equity options from traditional brokers. Crypto options support may be considered for future releases.

πŸ—ΊοΈ Roadmap

Vote on features or submit your ideas in GitHub Discussions

Want to see a feature? Open an issue or contribute code!

🀝 Contributing

We welcome contributions from traders and developers!

How to Contribute

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/AmazingFeature
  3. Commit your changes: git commit -m 'Add AmazingFeature'
  4. Push to the branch: git push origin feature/AmazingFeature
  5. Open a Pull Request

Contribution Ideas

  • πŸ› Bug fixes and error handling improvements
  • πŸ“Š New strategy support (butterflies, calendars, diagonals)
  • 🎨 UI/UX improvements and design enhancements
  • πŸ“š Documentation enhancements (tutorials, examples)
  • πŸ§ͺ Test coverage and quality assurance
  • 🌐 Internationalization (translate to other languages)
  • πŸ”— Additional broker integrations
  • πŸ“ˆ Advanced analytics features (max drawdown, Sharpe ratio)
  • πŸ€– AI Coach enhancements and new coaching features

Development Setup

git clone https://github.com/r-brown/GammaLedger.git
cd GammaLedger
# Open index.html in your browser
# No build process required - pure vanilla JavaScript!

Code Style Guidelines

  • Use vanilla JavaScript (no frameworks required)
  • Follow existing code patterns and conventions
  • Add clear comments for complex logic
  • Test in Chrome, Firefox, and Edge before submitting PR
  • Update documentation for new features

See CONTRIBUTING.md for detailed guidelines and coding standards.

πŸ“œ License

GammaLedger is open source and free forever under the AGPLv3 license for non-commercial and open-source compliant use. See the LICENSE file for full terms.

This means you can freely use, modify, and distribute GammaLedger for personal projects, research, or open-source applications, as long as you share any modifications under the same licenseβ€”especially if deployed over a network (e.g., in SaaS setups).

For proprietary integrations, commercial deployments, or use without sharing your changes (ideal for fintech startups or hedge funds protecting IP), we offer a flexible commercial license. Benefits include:

  • No copyleft requirements
  • Priority support
  • Custom features or indemnification

For commercial use, please contact us to obtain a commercial license

βš–οΈ Disclaimer

This software is for educational and analytical purposes only. Options trading involves substantial risk and may not be suitable for all investors. Past performance does not guarantee future results. The AI Coach provides educational insights and is not financial advice. Please consult with a qualified financial advisor before making investment decisions.

Options Risk Disclosure: Trading options involves risk and is not suitable for all investors. You could lose more than your initial investment. Please read the Characteristics and Risks of Standardized Options before trading.

⭐ Star History

Star History Chart

About

Master your trading performance by analyzing results, tracking portfolio dynamics, and optimizing options strategies for continuous improvement.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Sponsor this project

 

Contributors 2

  •  
  •