Skip to content

TechNatool/zenmarket-ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

33 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

ZenMarket AI πŸ“Š

AI-powered financial intelligence and automated market analysis system

CI/CD codecov Python 3.11+ License: MIT Code style: black Ruff Type checked: mypy security: bandit Pre-commit

ZenMarket AI is a professional-grade financial intelligence system that combines real-time market data, news analysis, sentiment tracking, and AI-powered insights to deliver actionable market intelligence. Built with production-quality code, comprehensive testing, and robust risk management.


✨ Features

πŸ“° Financial Intelligence

  • Automated News Aggregation: Multi-source financial news fetching
  • AI-Powered Analysis: OpenAI GPT-4 and Anthropic Claude integration
  • Sentiment Analysis: Market sentiment tracking with lexicon-based and AI methods
  • Daily Financial Brief: Comprehensive market overview reports

πŸ“ˆ AI Trading Advisor

  • Technical Analysis: MA20/50, RSI(14), Bollinger Bands, ATR, MACD
  • Trading Signals: AI-generated BUY/SELL/HOLD signals with confidence scores
  • Visual Charts: Professional matplotlib charts with indicators
  • Market Bias Detection: Overall market sentiment analysis

πŸ’Ό Trading Simulator & Backtesting

  • Paper Trading: Realistic order execution simulator
  • Position Sizing: Fixed fractional, Kelly criterion, percent of equity, R-multiples
  • Risk Management: Circuit breakers, position limits, drawdown protection
  • Performance Metrics: Sharpe, Sortino, CAGR, Max DD, Win rate, Profit factor
  • Backtesting Engine: Historical simulation with detailed reports

πŸš€ Professional Quality

  • Type Safety: Full mypy type checking
  • Test Coverage: β‰₯90% coverage with unit and integration tests
  • Security: Bandit security scanning, pip-audit vulnerability checks
  • CI/CD: Automated testing and quality gates
  • Documentation: Comprehensive docs with MkDocs
  • Code Quality: Black, isort, ruff linting

πŸš€ Quick Start

Prerequisites

  • Python 3.11 or 3.12
  • API keys for:

Installation

# Clone the repository
git clone https://github.com/TechNatool/zenmarket-ai.git
cd zenmarket-ai

# Install dependencies
make setup
# or manually:
pip install -e ".[dev]"

# Copy and configure environment
cp .env.example .env
# Edit .env with your API keys

# Verify installation
make test

Basic Usage

# Generate financial brief
python -m src.cli brief --symbols AAPL,MSFT,GOOGL

# Run trading simulator
python -m src.cli simulate --symbol AAPL --strategy conservative

# Run backtest
python -m src.cli backtest --symbol AAPL --start 2024-01-01 --end 2024-12-31

πŸ“– Documentation

Full documentation available at: docs/


πŸ› οΈ Development

Setup Development Environment

# Install development dependencies
make setup

# Install pre-commit hooks
make install-hooks

Available Make Commands

make help          # Show all available commands
make fmt           # Format code (black + isort)
make lint          # Lint code (ruff)
make type          # Type check (mypy)
make test          # Run tests
make test-fast     # Run tests in parallel
make cov           # Generate coverage report
make audit         # Security audit (bandit + pip-audit)
make docstrings    # Check docstring coverage
make docs          # Build documentation
make docs-serve    # Serve docs locally
make precommit     # Run all checks (recommended before commit)
make ci            # Run all CI checks
make clean         # Clean build artifacts

Running Quality Checks

# Format code
make fmt

# Run all checks (recommended before commit)
make precommit

# Individual checks
make lint       # Linting
make type       # Type checking
make test       # Tests
make audit      # Security

Project Structure

zenmarket-ai/
β”œβ”€β”€ src/                    # Source code
β”‚   β”œβ”€β”€ advisor/           # Trading signals and indicators
β”‚   β”œβ”€β”€ cli/               # Command-line interface
β”‚   β”œβ”€β”€ core/              # Core analysis engine
β”‚   β”œβ”€β”€ execution/         # Trading execution and simulation
β”‚   β”œβ”€β”€ reports/           # Report generation
β”‚   └── utils/             # Utilities
β”œβ”€β”€ tests/                 # Test suite
β”‚   β”œβ”€β”€ execution/         # Execution module tests
β”‚   └── ...
β”œβ”€β”€ docs/                  # Documentation
β”œβ”€β”€ reports/               # Generated reports
β”œβ”€β”€ data/                  # Data files
β”œβ”€β”€ pyproject.toml         # Project configuration
β”œβ”€β”€ Makefile               # Development commands
β”œβ”€β”€ .pre-commit-config.yaml # Pre-commit hooks
└── README.md              # This file

πŸ§ͺ Testing

# Run all tests
make test

# Run with coverage
make cov

# Run unit tests only
make test-unit

# Run integration tests only
make test-integration

# Run fast (parallel)
make test-fast

Test Coverage

Current coverage: β‰₯90% (lines and branches)

View coverage report:

make cov
# Open htmlcov/index.html in browser

πŸ”’ Security

ZenMarket AI is designed for educational and research purposes. It operates in paper trading mode by default.

Security Features

  • API key protection via .env
  • Circuit breakers and risk limits
  • Input validation with Pydantic
  • Regular security audits (bandit, pip-audit)
  • Automated dependency updates (Renovate)

Security Reporting

Please report security vulnerabilities to: security@technatool.com

See SECURITY.md for details.


🀝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

Quick Contribution Guide

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Run quality checks: make precommit
  5. Commit with conventional commits
  6. Submit a pull request

See CONTRIBUTING.md for detailed guidelines.


πŸ“Š Performance Metrics

ZenMarket AI tracks comprehensive performance metrics:

  • Returns: CAGR, Total Return
  • Risk-Adjusted: Sharpe Ratio, Sortino Ratio, Calmar Ratio
  • Risk: Maximum Drawdown, Volatility, VaR, CVaR
  • Trading: Win Rate, Profit Factor, Expectancy, Average Win/Loss
  • Activity: Number of Trades, Trade Frequency, Holding Period

πŸ—οΈ Architecture

graph TB
    A[Market Data] -->|yfinance| B[Data Collection]
    C[News Sources] -->|feedparser| B
    B --> D[Analysis Engine]
    D --> E[AI Processing]
    E -->|OpenAI/Anthropic| F[Insights]
    D --> G[Technical Indicators]
    G --> H[Signal Generator]
    H --> I[Execution Engine]
    I --> J[Risk Manager]
    J --> K[Broker Simulator]
    K --> L[Position Manager]
    L --> M[Performance Tracker]
    M --> N[Reports & Visualization]
Loading

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ“§ Contact & Support


πŸ™ Acknowledgments

  • Built with OpenAI GPT-4 and Anthropic Claude
  • Market data from yfinance
  • Technical analysis with pandas and numpy
  • Visualization with matplotlib and seaborn

⚠️ Disclaimer

This software is for educational and research purposes only. It is not financial advice.

  • Trading involves substantial risk of loss
  • Past performance does not guarantee future results
  • Paper trading results may not reflect real trading
  • Always conduct thorough testing before live trading
  • Consult with financial professionals before making investment decisions

Use at your own risk.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •