Skip to content

debegr92/tradeblocks

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

891 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TradeBlocks

Options trading analytics platform with a web dashboard and AI-powered analysis via MCP (Model Context Protocol).

Repository Structure

tradeblocks/ ├── app/ # Next.js web application ├── components/ # React components (shadcn/ui + Plotly charts) ├── tests/ # Jest test suites ├── docs/ # Documentation │ └── development.md # Architecture and local dev guide └── packages/ ├── lib/ # Core business logic (@tradeblocks/lib) ├── mcp-server/ # MCP server (npm: tradeblocks-mcp) └── agent-skills/ # AI agent skill definitions 

Quick Start

Development Setup

git clone https://github.com/davidromeo/tradeblocks.git cd tradeblocks npm install npm run dev # Web dashboard at http://localhost:3000

MCP Server

# Run directly with npx npx tradeblocks-mcp ~/Trading/backtests # Or from source npm run build -w packages/mcp-server node packages/mcp-server/server/index.js ~/Trading/backtests

Testing

npm test # All tests npm test -- path/to/file.test.ts # Single file npm run test:coverage # Coverage report

Documentation

Guide Description
Development Guide Architecture, local setup, testing
MCP Server README Installation, platform configuration
MCP Usage Guide Tool reference, example workflows
Agent Skills Guided conversational analysis

Data Format

Both the web dashboard and MCP server accept CSV exports from platforms like Option Omega. Each block contains:

  • tradelog.csv (required) - Trade history with P/L, dates, strategy name
  • dailylog.csv (optional) - Daily portfolio values for enhanced drawdown calculations
  • reportinglog.csv (optional) - Actual/reported trades for backtest vs live comparison

Files are auto-detected by column headers, not filenames. See USAGE.md for format details.

Features Overview

Web Dashboard

  • Performance dashboards with equity curves, drawdowns, monthly returns
  • Risk tooling: Monte Carlo simulator, position sizing, correlation analysis
  • Block-based organization for multiple strategies
  • Client-side storage (IndexedDB) - data stays on your machine

MCP Server

  • 19 analysis tools for statistics, simulations, walk-forward analysis
  • Works with Claude Desktop, Claude Code, Codex CLI, Gemini CLI
  • Agent skills for guided strategy health checks and portfolio recommendations

Contributing

  1. Create a feature branch
  2. Update or add tests when behavior changes
  3. Run npm run lint and npm test before opening a pull request

License

MIT

About

Portfolio analytics analysis for OptionsOmega portfolio back tests

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • TypeScript 99.4%
  • Other 0.6%