Package Exports
- neural-trader
- neural-trader/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (neural-trader) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
neural-trader
Complete Neural Trader platform - all features included. This meta-package installs all Neural Trader components for a full-featured algorithmic trading system powered by Rust.
Features
- Complete Platform: All 13 Neural Trader packages in one install
- Zero Configuration: Works out of the box
- Rust Performance: Native bindings for maximum speed
- Professional Tools: Everything from backtesting to live trading
- 150+ Indicators: Comprehensive technical analysis
- Neural Networks: State-of-the-art ML models
- Risk Management: VaR, CVaR, Kelly Criterion, and more
Installation
npm install neural-traderThis installs all packages:
@neural-trader/core- Core types and interfaces@neural-trader/backtesting- High-performance backtesting engine@neural-trader/neural- Neural network models@neural-trader/risk- Risk management toolkit@neural-trader/strategies- Trading strategies@neural-trader/portfolio- Portfolio management@neural-trader/execution- Order execution@neural-trader/brokers- Broker integrations@neural-trader/market-data- Market data providers@neural-trader/features- Technical indicators@neural-trader/sports-betting- Sports betting tools@neural-trader/prediction-markets- Prediction markets@neural-trader/news-trading- News-driven trading
Quick Start
import {
BacktestEngine,
NeuralModel,
RiskManager,
StrategyRunner,
PortfolioManager,
BrokerClient,
MarketDataProvider
} from 'neural-trader';
// Everything you need in one import!
// 1. Set up market data
const dataProvider = new MarketDataProvider({
provider: 'alpaca',
apiKey: process.env.ALPACA_KEY,
apiSecret: process.env.ALPACA_SECRET,
websocketEnabled: true
});
await dataProvider.connect();
// 2. Create trading strategy
const strategyRunner = new StrategyRunner();
await strategyRunner.addMomentumStrategy({
name: 'SMA Crossover',
symbols: ['AAPL', 'MSFT', 'GOOGL'],
parameters: JSON.stringify({ shortPeriod: 20, longPeriod: 50 })
});
// 3. Set up risk management
const riskManager = new RiskManager({
confidenceLevel: 0.95,
lookbackPeriods: 252,
method: 'historical'
});
// 4. Backtest strategy
const backtestEngine = new BacktestEngine({
initialCapital: 100000,
startDate: '2023-01-01',
endDate: '2023-12-31',
commission: 0.001,
slippage: 0.0005,
useMarkToMarket: true
});
const signals = await strategyRunner.generateSignals();
const result = await backtestEngine.run(signals, 'market-data.csv');
console.log(`Sharpe Ratio: ${result.metrics.sharpeRatio.toFixed(2)}`);
console.log(`Total Return: ${(result.metrics.totalReturn * 100).toFixed(2)}%`);
console.log(`Max Drawdown: ${(result.metrics.maxDrawdown * 100).toFixed(2)}%`);
// 5. Train neural model
const model = new NeuralModel({
modelType: 'LSTMAttention',
inputSize: 20,
horizon: 5,
hiddenSize: 128,
numLayers: 3,
dropout: 0.2,
learningRate: 0.001
});
await model.train(trainingData, targets, {
epochs: 100,
batchSize: 32,
validationSplit: 0.2,
earlyStoppingPatience: 10,
useGpu: true
});
// 6. Connect to broker for live trading
const broker = new BrokerClient({
brokerType: 'alpaca',
apiKey: process.env.ALPACA_KEY,
apiSecret: process.env.ALPACA_SECRET,
paperTrading: true
});
await broker.connect();
// 7. Manage portfolio
const portfolio = new PortfolioManager(100000);
// You're ready to trade!What's Included
Core & Infrastructure
- @neural-trader/core: TypeScript types and interfaces (zero dependencies)
- @neural-trader/execution: Smart order execution with TWAP/VWAP
- @neural-trader/brokers: Alpaca, Interactive Brokers, TD Ameritrade integration
Data & Analysis
- @neural-trader/market-data: Real-time and historical market data
- @neural-trader/features: 150+ technical indicators
- @neural-trader/backtesting: Lightning-fast backtesting engine
Trading & Strategy
- @neural-trader/strategies: Momentum, mean reversion, pairs trading
- @neural-trader/portfolio: Portfolio optimization and management
- @neural-trader/risk: VaR, CVaR, Kelly Criterion, Sharpe/Sortino
Advanced Features
- @neural-trader/neural: LSTM, Transformer, N-HiTS models
- @neural-trader/sports-betting: Arbitrage and Kelly sizing
- @neural-trader/prediction-markets: Polymarket and Augur (coming soon)
- @neural-trader/news-trading: Sentiment analysis (coming soon)
Platform Requirements
- Node.js: 16.x or higher
- Operating System: Linux, macOS, or Windows
- Optional: CUDA 11+ for GPU acceleration
Documentation
Each package includes comprehensive documentation:
Examples
See the examples directory for:
- Complete trading systems
- Strategy development tutorials
- Backtest optimization
- Live trading setup
- Neural network training
Support
- Documentation: https://github.com/ruvnet/neural-trader
- Issues: https://github.com/ruvnet/neural-trader/issues
- Discussions: https://github.com/ruvnet/neural-trader/discussions
License
This package is dual-licensed under MIT OR Apache-2.0.
MIT License: https://opensource.org/licenses/MIT Apache-2.0 License: https://www.apache.org/licenses/LICENSE-2.0
You may choose either license for your use.
Built with Rust 🦀 | Powered by Neural Networks 🧠 | Ready for Production ✨