{"id":28984345,"url":"https://github.com/marketcalls/pyindicators","last_synced_at":"2025-06-24T17:09:48.938Z","repository":{"id":296240870,"uuid":"992733147","full_name":"marketcalls/pyindicators","owner":"marketcalls","description":"Pyindicators - Built with Claude Code","archived":false,"fork":false,"pushed_at":"2025-05-29T17:42:20.000Z","size":39,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-05-29T17:53:53.396Z","etag":null,"topics":["indicators","numba","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marketcalls.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-29T16:15:58.000Z","updated_at":"2025-05-29T17:42:23.000Z","dependencies_parsed_at":"2025-06-03T03:03:30.118Z","dependency_job_id":null,"html_url":"https://github.com/marketcalls/pyindicators","commit_stats":null,"previous_names":["marketcalls/pyindicators"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/marketcalls/pyindicators","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marketcalls%2Fpyindicators","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marketcalls%2Fpyindicators/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marketcalls%2Fpyindicators/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marketcalls%2Fpyindicators/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marketcalls","download_url":"https://codeload.github.com/marketcalls/pyindicators/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marketcalls%2Fpyindicators/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261721228,"owners_count":23199637,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["indicators","numba","python"],"created_at":"2025-06-24T17:09:47.333Z","updated_at":"2025-06-24T17:09:48.929Z","avatar_url":"https://github.com/marketcalls.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PyIndicators\n\n[![PyPI version](https://badge.fury.io/py/pyindicators.svg)](https://badge.fury.io/py/pyindicators)\n[![Python](https://img.shields.io/pypi/pyversions/pyindicators.svg)](https://pypi.org/project/pyindicators/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n🚀 **The most user-friendly technical analysis library for Python!** Combining Numba-powered performance with intelligent automation and beautiful visualizations.\n\n\u003e **100x easier to use than TA-Lib** - with auto-detection, one-line analysis, built-in backtesting, streaming support, and interactive widgets!\n\n## ✨ Key Features\n\n- 🏎️ **Blazing Fast**: Numba JIT-compiled for C-like performance\n- 🧠 **Intelligent**: Auto-detects data formats and column names\n- 📊 **Complete**: 25+ indicators with built-in visualization and backtesting\n- 🐼 **Pandas Native**: Full DataFrame/Series support with named outputs\n- 📱 **Interactive**: Jupyter widgets and visual strategy builders\n- ⚡ **Real-time**: Streaming indicators for live trading\n- 🔧 **Flexible**: From one-liners to advanced pipelines\n- 🛡️ **Robust**: Smart error handling with helpful suggestions\n\n## 🚀 Installation\n\n```bash\npip install pyindicators\n\n# For interactive features\npip install pyindicators[widgets]\n\n# For development\npip install pyindicators[dev]\n```\n\n## ⚡ Quick Start - Choose Your Style\n\n### 🎯 **Absolute Beginner** (1 line!)\n```python\nfrom pyindicators.easy import analyze\n\n# Auto-detects columns, adds indicators, plots, and backtests!\nresults = analyze('your_data.csv')\n```\n\n### 🐼 **Pandas User** (Most Popular)\n```python\nfrom pyindicators.easy import SmartDataFrame\n\n# Works with any CSV/JSON/Parquet file or DataFrame\ndf = SmartDataFrame('AAPL.csv')  # Auto-detects OHLC columns!\n\n# Add indicators with short names\ndf.add_indicators('rsi', 'macd', 'bb', 'volume')\n\n# Or add everything at once\ndf.add_indicators('all')\n\n# Built-in visualization with signals\ndf.plot()\n\n# Instant backtesting\nperformance = df.backtest(strategy='macd_cross')\nprint(performance)\n```\n\n### 🔗 **Pipeline Enthusiast** (Advanced)\n```python\nfrom pyindicators.pipeline import IndicatorPipeline\n\n# Chain operations fluently\nsignals = (IndicatorPipeline(data)\n    .rsi()\n    .bollinger_bands()\n    .macd()\n    .add_signal('buy', lambda df: (df['RSI_14'] \u003c 30) \u0026 (df['Close'] \u003c df['BB_Lower']))\n    .add_signal('sell', lambda df: (df['RSI_14'] \u003e 70) \u0026 (df['Close'] \u003e df['BB_Upper']))\n    .golden_cross()\n    .divergence()\n    .get())\n```\n\n### 📊 **Interactive User** (Jupyter)\n```python\nfrom pyindicators.widgets import interactive_analysis\n\n# Launch interactive explorer with sliders and real-time updates\nexplorer = interactive_analysis('data.csv')\n```\n\n### ⚡ **Live Trader** (Real-time)\n```python\nfrom pyindicators.streaming import LiveTrader\n\ntrader = LiveTrader()\n\n# In your trading loop\nresult = trader.on_tick({\n    'high': 105.2, 'low': 104.8, \n    'close': 105.0, 'volume': 1000000\n})\n\nif result['action'] == 'BUY':\n    print(f\"Buy signal at ${result['indicators']['close']}\")\n```\n\n### 💻 **Command Line User**\n```bash\n# Quick analysis\npyindicators analyze AAPL.csv\n\n# Calculate specific indicator\npyindicators calc data.csv -i rsi -p 21\n\n# Run backtest\npyindicators backtest data.csv -s macd_cross -c 10000\n\n# Find signals\npyindicators signals data.csv --action buy\n```\n\n## 🎛️ **All Available Interfaces**\n\n| Interface | Best For | Example |\n|-----------|----------|---------|\n| **Easy Mode** | Beginners, quick analysis | `analyze('data.csv')` |\n| **Pandas Wrapper** | Data scientists | `ta.rsi(df['Close'])` |\n| **NumPy Core** | Performance-critical | `rsi(close_array, 14)` |\n| **Pipelines** | Complex strategies | `Pipeline(data).rsi().macd()` |\n| **Streaming** | Live trading | `trader.on_tick(live_data)` |\n| **CLI** | Terminal users | `pyindicators analyze data.csv` |\n| **Widgets** | Jupyter notebooks | `interactive_analysis(data)` |\n\n## 📊 **Available Indicators**\n\n### 🚀 **Momentum** (7 indicators)\n- **RSI** (Relative Strength Index) - `rsi()`\n- **Stochastic Oscillator** - `stochastic()`\n- **Williams %R** - `williams_r()`\n- **Rate of Change** - `roc()`\n- **Momentum** - `momentum()`\n\n### 📈 **Trend** (7 indicators)\n- **SMA** (Simple Moving Average) - `sma()`\n- **EMA** (Exponential Moving Average) - `ema()`\n- **WMA** (Weighted Moving Average) - `wma()`\n- **DEMA** (Double Exponential MA) - `dema()`\n- **TEMA** (Triple Exponential MA) - `tema()`\n- **MACD** (Moving Average Convergence Divergence) - `macd()`\n- **ADX** (Average Directional Index) - `adx()`\n\n### 📊 **Volatility** (5 indicators)\n- **Bollinger Bands** - `bollinger_bands()`\n- **ATR** (Average True Range) - `atr()`\n- **Keltner Channels** - `keltner_channels()`\n- **Donchian Channels** - `donchian_channels()`\n- **Standard Deviation** - `standard_deviation()`\n\n### 📦 **Volume** (5 indicators)\n- **OBV** (On Balance Volume) - `obv()`\n- **VWAP** (Volume Weighted Average Price) - `vwap()`\n- **A/D Line** (Accumulation/Distribution) - `ad()`\n- **MFI** (Money Flow Index) - `mfi()`\n- **CMF** (Chaikin Money Flow) - `cmf()`\n\n## 🎯 **Built-in Trading Strategies**\n\n```python\n# Pre-built strategies ready to use\nstrategies = [\n    'simple',       # RSI oversold/overbought\n    'macd_cross',   # MACD crossover signals\n    'bb_bounce',    # Bollinger Band mean reversion\n    'trend_follow'  # Multi-indicator trend following\n]\n\n# Instant backtesting\nresults = df.backtest(strategy='macd_cross')\n```\n\n## 🎨 **Advanced Features**\n\n### 🔍 **Smart Data Detection**\n```python\n# Works with ANY column naming convention!\ndf = SmartDataFrame(data)  # Auto-detects: Close, close, CLOSE, Close_Price, etc.\n```\n\n### 🔗 **Multi-Timeframe Analysis**\n```python\nfrom pyindicators.easy import MultiTimeframe\n\nmtf = MultiTimeframe(data)\nmtf.add_timeframe('daily', 'D')\nmtf.add_timeframe('weekly', 'W')\nconfluence = mtf.find_confluence()  # Find signals across timeframes\n```\n\n### 🎯 **Signal Detection**\n```python\nfrom pyindicators.easy import find_signals\n\n# Find all trading signals automatically\nsignals = find_signals('AAPL.csv')\nprint(signals.head())\n```\n\n### 🛠️ **Custom Indicators**\n```python\n# Create custom indicators easily\npipeline = (IndicatorPipeline(data)\n    .custom(lambda df: df['Close'].rolling(20).skew(), 'Skewness_20')\n    .transform('Volume', lambda x: np.log(x), 'Log_Volume'))\n```\n\n### 🎮 **Interactive Visualization**\n```python\nfrom pyindicators.visual import launch_visual_tools\n\n# Interactive chart with sliders\nlaunch_visual_tools(data, tool='interactive')\n\n# Strategy builder with drag-and-drop\nlaunch_visual_tools(data, tool='builder')\n\n# Indicator playground\nlaunch_visual_tools(data, tool='playground')\n```\n\n## 🚨 **Smart Error Handling**\n\nPyIndicators provides helpful error messages and suggestions:\n\n```python\n# Instead of cryptic errors, you get:\n❌ Column 'Close' not found in DataFrame!\n\nAvailable columns: ['close', 'high', 'low', 'volume']\n\nDid you mean one of these?\n  • close\n\n💡 Tip: Check your column names are correct. Common issues:\n  - Case sensitivity (Close vs close)\n  - Extra spaces in column names\n```\n\n## 🏎️ **Performance**\n\nStill blazing fast with Numba optimization:\n\n```python\nimport time\nfrom pyindicators import rsi\n\n# 1 million data points\ndata = np.random.randn(1_000_000) + 100\n\nstart = time.time()\nresult = rsi(data, period=14)\nelapsed = time.time() - start\n\nprint(f\"Calculated RSI for 1M points in {elapsed:.3f} seconds\")\n# Output: Calculated RSI for 1M points in 0.045 seconds\n```\n\n## 📖 **Complete Examples**\n\n### 📈 **Full Technical Analysis Workflow**\n```python\nfrom pyindicators.easy import SmartDataFrame\nimport yfinance as yf\n\n# Load data (or use any CSV/DataFrame)\ndf = yf.download('AAPL', start='2020-01-01')\n\n# Create smart dataframe with auto-detection\nsdf = SmartDataFrame(df)\n\n# Add all indicators\nsdf.add_indicators('all')\n\n# Create custom strategy\nsdf.add_signal('custom_buy', lambda df: \n    (df['RSI'] \u003c 30) \u0026 \n    (df['MACD'] \u003e df['MACD_Signal']) \u0026 \n    (df['Close'] \u003c df['BB_Lower'])\n)\n\n# Backtest multiple strategies\nstrategies = ['simple', 'macd_cross', 'bb_bounce', 'trend_follow']\nfor strategy in strategies:\n    results = sdf.backtest(strategy=strategy)\n    print(f\"{strategy}: {results['total_return']}\")\n\n# Beautiful visualization\nsdf.plot(show_signals=True)\n\n# Export results\nsdf.df.to_csv('analysis_results.csv')\n```\n\n### 🔄 **Streaming Analysis**\n```python\nfrom pyindicators.streaming import LiveTrader\nimport yfinance as yf\n\n# Setup live trader\ntrader = LiveTrader()\n\n# Simulate live data feed\nhistorical_data = yf.download('AAPL', period='1mo', interval='1m')\n\nfor timestamp, row in historical_data.iterrows():\n    tick_data = {\n        'high': row['High'],\n        'low': row['Low'], \n        'close': row['Close'],\n        'volume': row['Volume']\n    }\n    \n    result = trader.on_tick(tick_data)\n    \n    if result['action']:\n        print(f\"[{timestamp}] {result['action']} signal at ${tick_data['close']:.2f}\")\n        print(f\"RSI: {result['indicators'].get('rsi', 'N/A'):.1f}\")\n\n# Get performance\nperformance = trader.get_performance()\nprint(f\"Total PnL: {performance['total_pnl']}\")\n```\n\n### 🎯 **Strategy Comparison**\n```python\nfrom pyindicators.pipeline import StrategyPipeline\n\n# Test multiple strategy setups\nstrategies = {\n    'Conservative': StrategyPipeline(data).mean_reversion_setup(bb_period=20, rsi_period=21),\n    'Aggressive': StrategyPipeline(data).trend_following_setup(fast=10, slow=30),\n    'Breakout': StrategyPipeline(data).breakout_setup(period=15)\n}\n\nresults = {}\nfor name, strategy in strategies.items():\n    df_with_signals = strategy.get()\n    # Calculate returns for each strategy\n    # ... backtesting logic\n    results[name] = performance_metrics\n\nprint(\"Strategy Performance Comparison:\")\nprint(pd.DataFrame(results).T)\n```\n\n## 📚 **Documentation \u0026 Tutorials**\n\n- **[Getting Started Guide](docs/getting_started.md)** - Complete beginner tutorial\n- **[API Reference](docs/api_reference.md)** - Full function documentation  \n- **[Strategy Guide](docs/strategies.md)** - Trading strategy examples\n- **[Performance Tips](docs/performance.md)** - Optimization techniques\n- **[Jupyter Examples](examples/)** - Interactive notebook tutorials\n\n## 🧪 **Development**\n\n### Running Tests\n```bash\n# Install development dependencies\npip install -e .[dev]\n\n# Run all tests\npytest\n\n# Run with coverage\npytest --cov=pyindicators --cov-report=html\n\n# Run specific test file\npytest tests/test_pandas_wrapper.py -v\n```\n\n### Benchmarking\n```bash\n# Performance benchmarks\npython examples/benchmark.py\n\n# Memory usage analysis\npython examples/memory_profile.py\n```\n\n### Code Quality\n```bash\n# Format code\nblack pyindicators tests\n\n# Lint code  \nruff check pyindicators tests\n\n# Type checking\nmypy pyindicators\n```\n\n## 🤝 **Contributing**\n\nWe welcome contributions! Here's how to get started:\n\n1. **Fork** the repository\n2. **Create** a feature branch (`git checkout -b feature/amazing-feature`)\n3. **Add tests** for your changes\n4. **Ensure** all tests pass (`pytest`)\n5. **Commit** your changes (`git commit -m 'Add amazing feature'`)\n6. **Push** to the branch (`git push origin feature/amazing-feature`)\n7. **Open** a Pull Request\n\n### 💡 **Ideas for Contributions**\n- New technical indicators\n- Additional trading strategies  \n- Performance optimizations\n- Documentation improvements\n- Integration with data providers (Alpha Vantage, Quandl, etc.)\n- Additional visualization options\n\n## 📄 **License**\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## 🙏 **Acknowledgments**\n\n- **Numba Team** - For the incredible JIT compiler\n- **Pandas Team** - For the amazing DataFrame functionality\n- **TA-Lib** - For inspiration and reference implementations\n- **Technical Analysis Community** - For indicator formulas and expertise\n\n## 💬 **Support \u0026 Community**\n\n- 🐛 **Bug Reports**: [GitHub Issues](https://github.com/your-username/pyindicators/issues)\n- 💡 **Feature Requests**: [GitHub Discussions](https://github.com/your-username/pyindicators/discussions)\n- 📧 **Email**: support@pyindicators.com\n- 💬 **Discord**: [Join our community](https://discord.gg/pyindicators)\n\n## ⭐ **Star History**\n\nIf you find PyIndicators helpful, please give it a ⭐️ on GitHub! It helps others discover the project.\n\n[![Star History Chart](https://api.star-history.com/svg?repos=your-username/pyindicators\u0026type=Date)](https://star-history.com/#your-username/pyindicators\u0026Date)\n\n---\n\n**Made with ❤️ for the trading and data science community**\n\n\u003e \"The best technical analysis library you'll ever use!\" - Happy Users","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarketcalls%2Fpyindicators","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarketcalls%2Fpyindicators","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarketcalls%2Fpyindicators/lists"}