# Installation Guide This guide will help you install and configure TechKit on different platforms. Choose the appropriate installation method based on your use case. ## Python Installation ### Basic Installation The Python version is the most commonly used version of TechKit, especially suitable for data analysis and research scenarios. ```bash pip install techkit ``` ### System Requirements - **Python Version**: 3.10 or higher - **Dependencies**: NumPy 1.21 or higher (installed automatically) - **Operating Systems**: - Linux (x86_64, aarch64) - macOS (x86_64, arm64) - Windows (AMD64) ### Verify Installation After installation, you can verify it as follows: ```python import techkit as tk import numpy as np # Test basic functionality sma = tk.SMA(period=20) prices = np.array([100.0, 101.0, 102.0, 103.0, 104.0]) result = sma.calculate(prices) print("Installation successful! TechKit version:", tk.__version__) print("SMA calculation result:", result) ``` ### Common Issues **Q: Compilation errors during installation?** A: TechKit Python package provides pre-compiled binary packages (wheels), so compilation is usually not required. If you encounter issues: - Ensure Python version >= 3.10 - Ensure pip is up to date: `pip install --upgrade pip` - Try using `pip install techkit --no-cache-dir` **Q: How to upgrade to the latest version?** A: `pip install --upgrade techkit` **Q: Does it support Python 3.9?** A: No. TechKit requires Python 3.10+ features. ## JavaScript / Node.js Installation TechKit provides two Node.js packages. Choose based on your needs: ### techkit (Core Edition) - Recommended for Most Users ```bash npm install techkit # or yarn add techkit # or pnpm add techkit ``` **Features**: - Includes 158+ core indicators (TA-Lib compatible) - Small size (WASM ~200KB) - Supports Node.js and browsers - Automatically selects optimal backend (Native or WASM) **Use Cases**: Most applications requiring common technical indicators ### techkit-full (Full Edition) - For Complete Functionality ```bash npm install techkit-full # or yarn add techkit-full # or pnpm add techkit-full ``` **Features**: - Includes all 189 indicators - Includes advanced analytics (risk metrics, volatility models, pattern recognition) - Larger size (WASM ~800KB) - Supports Node.js and browsers **Use Cases**: Requiring complete functionality, advanced analytics, pattern recognition ### Version Comparison | Feature | techkit | techkit-full | |---------|---------|--------------| | Core Indicators | ✅ 158 | ✅ 158 | | Advanced Analytics | ❌ | ✅ 31 | | Risk Metrics | ❌ | ✅ Yes | | Volatility Models | ❌ | ✅ Yes | | Pattern Recognition | ❌ | ✅ Yes | | WASM Size | ~200KB | ~800KB | | Recommended For | Most applications | Complete functionality needs | ### Backend Selection TechKit Node.js packages automatically select the optimal backend: 1. **Native Backend** (Faster): - Automatically used on supported platforms - Requires platform-specific binary packages (installed automatically) - Best performance 2. **WASM Backend** (Universal): - Available on all platforms - Automatic fallback if Native is unavailable - Good performance, slightly larger size ### Verify Installation ```javascript import { init, SMA, getBackend } from 'techkit'; // Initialize (must be called before use) await init(); // Check which backend is being used console.log('Current backend:', getBackend()); // 'native' or 'wasm' // Test basic functionality const sma = new SMA(20); const result = sma.update(100.5); if (result.valid) { console.log('Installation successful! SMA value:', result.value); } // Cleanup resources sma.dispose(); ``` ### System Requirements - **Node.js**: 16.0 or higher - **Supported Platforms**: - Linux (x86_64) - macOS (x86_64, arm64) - Windows (AMD64) ## Browser / CDN Installation TechKit can be used directly in browsers without build tools: ### Using CDN (Recommended) ```html