Quickstart Tutorial
Get up and running with VectorAlpha in just a few minutes. This tutorial will guide you through installation and your first indicator calculation.
Build in 10 Minutes
This quickstart guide will have you calculating indicators and running your first backtest in under 10 minutes. We'll build a simple moving average crossover strategy using real market data.
Step 1: Installation
Install Rust
First, ensure you have Rust installed. VectorAlpha requires Rust 1.70 or later.
# Install Rust via rustup
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Verify installation
rustc --version
cargo --version Create a New Project
# Create a new Rust project
cargo new my_trading_bot
cd my_trading_bot
# Add VectorAlpha dependencies
cat >> Cargo.toml <<'EOF'
[dependencies]
vectoralpha-ta = "0.5"
vectoralpha-backtest = "0.3"
tokio = { version = "1", features = ["full"] }
serde = { version = "1.0", features = ["derive"] }
csv = "1.3"
anyhow = "1.0"
EOF Step 2: Load Market Data
Let's start by loading some historical price data. Create a file called src/main.rs:
Code Example Coming Soon
Full code examples with syntax highlighting will be available in the next update.
Sample Data Format
Your CSV file should have this format:
date,open,high,low,close,volume
2024-01-02,187.15,188.44,186.86,187.21,45123000
2024-01-03,187.84,188.63,187.05,188.22,4823400 Step 3: Calculate Technical Indicators
Now let's calculate some common technical indicators:
Code Example Coming Soon
Full code examples with syntax highlighting will be available in the next update.