QuantStock Documentation
Welcome to the official documentation for QuantStock, the advanced technical trading strategy backtester. This guide will help you get the most out of our platform, from basic usage to advanced features.
Quick Start Guide
Getting started with QuantStock is simple:
- Select a Stock: Use the search box in the sidebar to find and select a stock symbol (e.g., AAPL for Apple).
- Set Date Range: Define the time period for your backtest using the date pickers.
- Choose a Strategy: Select one of the available technical trading strategies from the tabs.
- Adjust Parameters: Customize the strategy parameters to suit your trading style.
- Run Backtest: Click the "Run Backtest" button to execute the backtest.
- Analyze Results: Review the performance metrics, trade history, and charts to evaluate your strategy.
User Interface Overview
The QuantStock interface is designed to be intuitive and efficient:
Sidebar
- Stock Selection: Search for and select stocks to test your strategies on.
- Date Range: Set the time period for your backtest.
- Strategy Selection: Choose from 17+ available technical trading strategies.
- Strategy Parameters: Customize the parameters of your selected strategy.
- Advanced Features: Access to strategy comparison, parameter optimization, and result export.
Main Content Area
- Performance Dashboard: Key metrics showing the overall performance of your strategy.
- Price Chart: Interactive chart showing price action with entry/exit signals.
- Indicator Chart: Displays the technical indicators used by your strategy.
- Results Tabs: Detailed view of performance metrics, trade history, equity curve, and more.
Trading Strategies Overview
QuantStock offers 17+ technical trading strategies that you can backtest and optimize. Each strategy has customizable parameters to suit different market conditions and trading styles.
MACD Strategy
The Moving Average Convergence Divergence (MACD) is a trend-following momentum indicator that shows the relationship between two moving averages of a security's price.
How it Works
- Buy Signal: MACD line crosses above Signal line
- Sell Signal: MACD line crosses below Signal line
Key Parameters
- Fast Period: Number of periods for the fast EMA (default: 12)
- Slow Period: Number of periods for the slow EMA (default: 26)
- Signal Period: Number of periods for the signal line EMA (default: 9)
- Use Histogram: Option to use MACD histogram zero-crossover for signals
RSI Strategy
The Relative Strength Index (RSI) is a momentum oscillator that measures the speed and change of price movements. It oscillates between 0 and 100 and is typically used to identify overbought or oversold conditions.
How it Works
- Buy Signal: RSI crosses above the oversold threshold (default: 30)
- Sell Signal: RSI crosses below the overbought threshold (default: 70)
Key Parameters
- Period: Number of periods for RSI calculation (default: 14)
- Overbought Level: Threshold for overbought condition (default: 70)
- Oversold Level: Threshold for oversold condition (default: 30)
- Use Divergence: Option to look for price/RSI divergence for stronger signals
Bollinger Bands Strategy
Bollinger Bands are volatility bands placed above and below a moving average. They expand and contract based on the volatility of the price, providing a relative definition of high and low prices.
How it Works
- Buy Signal: Price crosses below the lower band and then back above it
- Sell Signal: Price crosses above the upper band and then back below it
Key Parameters
- Period: Number of periods for the SMA calculation (default: 20)
- Standard Deviation: Number of standard deviations for bands (default: 2)
- Use Middle Band: Option to generate signals on middle band crosses
Moving Averages Crossover Strategy
The Moving Averages Crossover strategy uses two moving averages (fast and slow) to identify changes in trend.
How it Works
- Buy Signal: Fast MA crosses above Slow MA
- Sell Signal: Fast MA crosses below Slow MA
Key Parameters
- Fast MA Period: Number of periods for the fast moving average (default: 10)
- Slow MA Period: Number of periods for the slow moving average (default: 50)
- MA Type: Type of moving average to use (SMA, EMA, WMA, DEMA, TEMA, KAMA, MAMA, T3)
- Use Trend Filter: Option to use an additional longer-term MA as a trend filter
More Strategies
QuantStock offers many more strategies, including:
- Stochastic Oscillator
- Breakout
- Support/Resistance
- Fibonacci Retracement
- Ichimoku Cloud
- ADX
- CCI
- Accumulation/Distribution
- VWAP
- Supertrend
- Heikin Ashi
- Z-Score
- Renko
- And more...
Each strategy has detailed information and customizable parameters available in the application.
Parameter Optimization
The Parameter Optimization feature allows you to automatically find the best parameter combinations for a strategy, saving you hours of manual testing.
How to Optimize Parameters
- Select a stock and date range
- Click the "Optimize Parameters" button in the Advanced Features section
- Choose the strategy to optimize
- Select the performance metric to optimize for (e.g., Total Return, Sharpe Ratio)
- Define the parameter ranges for optimization
- Click "Run Optimization" to start the process
- Review the optimal parameters and performance
- Click "Apply Optimized Parameters" to use them for backtesting
Strategy Comparison
The Strategy Comparison feature allows you to directly compare the performance of different trading strategies on the same stock and time period.
How to Compare Strategies
- Select a stock and date range
- Click the "Compare Strategies" button in the Advanced Features section
- Select two strategies to compare
- Click "Compare" to see the results
- Review the performance metrics and differences
Performance Metrics
QuantStock provides a comprehensive set of performance metrics to evaluate your trading strategies:
- Total Return: Overall return from the strategy
- Annual Return: Annualized return (useful for comparing strategies over different time periods)
- Sharpe Ratio: Risk-adjusted return (higher values indicate better risk-adjusted performance)
- Max Drawdown: Largest peak-to-trough decline (lower values are better)
- Win Rate: Percentage of profitable trades
- Total Trades: Number of trades executed
- Avg. Profit/Trade: Average profit per trade
- Profit Factor: Gross profit divided by gross loss (values greater than 1 indicate a profitable strategy)
- Equity Curve: Visual representation of capital growth over time
- Drawdown Analysis: Visual representation of drawdowns over time
Exporting Results
QuantStock allows you to export your backtest results for further analysis:
- Run a backtest
- Click the "Export Results" button in the Advanced Features section
- Choose to export either "trades" (trade history) or "results" (complete results)
- Save the CSV file to your computer
The exported data can be imported into Excel, Google Sheets, or other data analysis tools for further analysis or record-keeping.
Frequently Asked Questions
General Questions
Is QuantStock completely free to use?
Yes, QuantStock is completely free to use with all 17+ technical strategies and features available. We do offer a Premium tier with additional features like API access, more historical data, and multi-asset backtesting.
What data sources do you use for backtesting?
We use high-quality historical data from reliable providers including Yahoo Finance, Alpha Vantage, and IEX Cloud. Our platform ensures data accuracy with adjustments for dividends and stock splits to provide realistic backtest results.
Technical Questions
Can I backtest custom strategies?
Currently, QuantStock supports 17+ pre-built technical strategies with customizable parameters. Custom strategy development is available in our Premium tier, where you can code your own strategies using our Python API.
What markets and timeframes can I backtest?
QuantStock supports backtesting across US stocks, ETFs, and major forex pairs. Timeframes range from 1-day to 1-month intervals, with intraday timeframes (1-hour, 15-min) available in the Premium tier.
Does backtesting guarantee future performance?
No. While backtesting is a powerful tool for strategy validation, past performance does not guarantee future results. Market conditions change, and strategies that performed well historically may not perform the same in the future.
Troubleshooting
Common Issues
The backtest doesn't return any trades
This can happen for several reasons:
- The strategy parameters may be too restrictive
- The selected date range may not contain suitable trading opportunities for the strategy
- The stock may not be suitable for the selected strategy
Try adjusting the strategy parameters, selecting a different date range, or testing a different strategy.
The application is slow or unresponsive
This can happen when:
- The date range is very large (many years of data)
- The strategy has complex calculations
- Multiple operations are running simultaneously
Try reducing the date range, simplifying the strategy, or waiting for the current operation to complete before starting a new one.
API Documentation
QuantStock provides a RESTful API for Premium users who want to integrate our backtesting capabilities into their own applications or automate their workflows.
API Endpoints
/api/stock-data
- Get historical stock data/api/strategies
- Get available strategies and parameters/api/backtest
- Run a backtest with specified parameters/api/compare
- Compare multiple strategies/api/optimize
- Optimize strategy parameters
For detailed API documentation, please contact our support team or visit the API Documentation section in your Premium account dashboard.