Data Management
Learn how to work with market data, upload your own data sources, and manage data for backtesting.
Understanding Data in Lona
Trading strategies need historical market data for backtesting. Lona supports two types of data:
1. Global Data (Pre-loaded)
What It Is: Market data provided by the platform Accessibility: Available to all users Identification: Marked with a 🌐 globe icon Usage: Select during execution, no upload needed
Common Global Data:
- Major stock indices (SPY, QQQ, DIA)
- Popular cryptocurrencies (BTCUSDT, ETHUSDT)
- Forex pairs (EURUSD, GBPUSD)
- Commodities (Gold, Oil)
2. Your Data (User-uploaded)
What It Is: Custom data you upload Accessibility: Only visible to you Usage: Select during execution like global data Control: You can edit or delete
Why Upload Your Own Data:
- Test on specific symbols not in global library
- Use higher-frequency data (minute, tick)
- Include custom indicators or signals
- Incorporate alternative data (sentiment, news)
Data Types
Lona supports two main data formats:
OHLCV Data (Market Prices)
What It Is: Standard market price data
Required Columns:
- Timestamp: Date/time of the bar
- Open: Opening price
- High: Highest price
- Low: Lowest price
- Close: Closing price
- Volume: Trading volume (optional)
Use Cases:
- Standard price-based strategies
- Technical indicator calculations
- Traditional trading algorithms
Custom Data (Non-Price Data)
What It Is: Any time-series data beyond prices
Examples:
- Sentiment scores
- News event counts
- Economic indicators
- Social media metrics
- Custom computed values
Use Cases:
- Alternative data strategies
- Fundamental analysis
- Sentiment-based trading
- Multi-factor models
Note: Custom data is for advanced users creating strategies that incorporate non-traditional data sources.
Uploading Data
Accessing the Upload Dialog
- Click Data in the left sidebar
- Click the Upload button (+ icon)
- Upload dialog opens
Step 1: Select Your File
Supported Format: CSV (Comma-Separated Values)
How to Upload:
- Drag and drop a CSV file into the upload area, or
- Click to browse and select a file
File Requirements:
- Must be a valid CSV file
- Should have consistent column structure
- Recommended: Include headers in first row
- Maximum size: Varies by plan (typically 50MB)
Step 2: Configure File Settings
After selecting a file, configure these settings:
Headers Checkbox
“CSV file has headers in first row”
- ✅ Checked: First row contains column names
- ☐ Unchecked: No headers, columns will be named automatically
Example with headers:
timestamp,open,high,low,close,volume
2023-01-01,100.5,101.2,100.1,100.8,1000000Example without headers:
2023-01-01,100.5,101.2,100.1,100.8,1000000Tip: Always include headers for clarity. Lona will auto-generate them if missing.
Data Type Selection
“Custom data (News, Sentiment, or other non-OHLCV data)”
- ☐ Unchecked: Standard OHLCV market data (default)
- ✅ Checked: Custom alternative data
Choose Based on Your File:
- Price data (OHLC) → Leave unchecked
- Sentiment scores → Check the box
- News counts → Check the box
- Economic indicators → Check the box
Step 3: OHLCV Data Configuration
If uploading standard market data (OHLCV), you’ll configure:
Symbol Name
Give your data source a meaningful name:
Good Names:
- “AAPL Daily 2010-2023”
- “BTCUSDT 1h Binance”
- “SPY 5min”
Include:
- Symbol/ticker
- Timeframe (daily, hourly, 5min)
- Source (optional)
- Date range (optional)
Column Mapping
Map your CSV columns to required data fields:
Required Mappings:
- Timestamp: Date/time column
- Close: Closing price column
Optional Mappings:
- Open: Opening price
- High: Highest price
- Low: Lowest price
- Volume: Trading volume
How to Map:
- For each field, select the corresponding column from dropdown
- If column doesn’t exist in your file, select “none”
- At minimum, map Timestamp and Close
Example Mapping:
Your CSV columns: date, open_price, high_price, low_price, close_price, vol
Map as:
- Timestamp →
date - Open →
open_price - High →
high_price - Low →
low_price - Close →
close_price - Volume →
vol
Data Preview
You’ll see a preview showing:
- First 5-10 rows of your data
- Column headers
- Sample values
Check the Preview: ✅ Dates look correct ✅ Prices are in right columns ✅ Values are properly formatted ✅ No obvious errors
Frequency
Select the data frequency from dropdown:
- Daily: One bar per day (most common)
- Hourly: One bar per hour
- Minute: One bar per minute
- Other: Custom frequency
Choose the frequency that matches your data.
Timezone
Select the timezone of your timestamp data:
Common options:
- UTC: Universal Coordinated Time (recommended for crypto)
- America/New_York: Eastern Time (US stocks)
- Europe/London: UK Time (LSE stocks)
- Asia/Tokyo: Japan Time (TSE stocks)
Important: Select the timezone your data was recorded in, not your local timezone.
Exchange (Optional)
Name the exchange where data originated:
- NYSE
- NASDAQ
- Binance
- Coinbase
- Etc.
This is informational and helps organize your data.
Step 4: Custom Data Configuration
If you checked “Custom data”, you’ll configure differently:
Symbol Name
Name describing your custom data:
Examples:
- “Twitter Sentiment BTC Daily”
- “WSB Mentions Count”
- “Economic Calendar Events”
- “News Sentiment SPY”
Column Mapping
Required:
- Timestamp: Date/time column (required)
- Value Columns: Map all columns you want to use
How It Works:
- All non-timestamp columns become available to your strategy
- Strategy can reference them by column name
- No predefined structure required
Example Custom Data:
CSV:
date,sentiment_score,mention_count,positive_ratio
2023-01-01,0.65,1234,0.72
2023-01-02,0.58,987,0.68Map:
- Timestamp →
date - Custom columns →
sentiment_score,mention_count,positive_ratio
Step 5: Review and Upload
- Review all settings in the dialog
- Check the preview one more time
- Click Upload button
Processing:
- File uploads to server
- Data is validated
- Columns are parsed
- Indexes are created
- Available for use in ~5-30 seconds
Success: You’ll see a success message and the dialog closes
Error: If upload fails, you’ll see specific error message (see Troubleshooting section)
Data Formats and Requirements
CSV File Format
Structure:
timestamp,open,high,low,close,volume
2023-01-01 09:30:00,100.50,101.20,100.10,100.80,1000000
2023-01-01 10:30:00,100.80,101.50,100.60,101.20,1200000Requirements:
- ✅ Comma-separated values
- ✅ One row per time period
- ✅ Consistent number of columns
- ✅ Valid timestamps
- ✅ Numeric price/volume values
Common Issues:
- ❌ Using semicolons instead of commas
- ❌ Missing values (empty cells)
- ❌ Inconsistent date formats
- ❌ Non-numeric values in price columns
Timestamp Formats
Supported Formats:
Date Only:
2023-01-01
01/01/2023
2023-01-01
Jan 1, 2023Date and Time:
2023-01-01 09:30:00
2023-01-01T09:30:00
2023-01-01 09:30:00.000
01/01/2023 09:30 AMWith Timezone:
2023-01-01 09:30:00 UTC
2023-01-01 09:30:00-05:00
2023-01-01T09:30:00ZBest Practice: Use ISO 8601 format:
YYYY-MM-DD HH:MM:SS
Price Data Format
Valid Price Values:
100.50 ✅ Decimal
100 ✅ Integer
1.5e2 ✅ Scientific notationInvalid Price Values:
$100.50 ❌ Currency symbol
100,50 ❌ Comma as decimal separator
N/A ❌ Non-numericVolume Format:
- Whole numbers:
1000000 - Can include decimals:
1000000.5 - No commas: Use
1000000not1,000,000
Managing Your Data
Viewing Data Sources
- Navigate to Data section
- See all available data sources:
- Global data (🌐 icon)
- Your uploaded data
Data Information
For each data source, you can view:
- Name: Symbol or data source name
- Type: OHLCV or Custom
- Frequency: Daily, hourly, etc.
- Date Range: Available time period
- Data Points: Number of records
- Source: Global or User-uploaded
Editing Data
For Your Uploaded Data:
- Click the Edit icon (pencil)
- Modify metadata:
- Change name
- Update description
- Adjust frequency
- Change timezone
- Save changes
Note: You cannot edit the actual data values, only metadata. To change data, delete and re-upload.
Deleting Data
- Find your uploaded data source
- Click Delete icon (trash)
- Confirm deletion
- ⚠️ Warning: This cannot be undone
Before Deleting:
- Verify you have backup of the file
- Check if any strategies depend on this data
- Consider if you might need it later
Data Best Practices
File Preparation
✅ Clean Your Data:
- Remove duplicate timestamps
- Fill missing values
- Verify price accuracy
- Check for outliers
✅ Consistent Format:
- Use same date format throughout
- Consistent decimal places
- Same column order
✅ Include Headers:
- Always add column names
- Use clear, descriptive names
- Avoid special characters
Naming Conventions
Use descriptive, consistent names:
Good Names:
"SPY-Daily-2010-2023"
"BTCUSDT-1h-Binance"
"AAPL-5min-2023"
"Twitter-Sentiment-Daily"Poor Names:
"data"
"test"
"file1"
"download"Data Quality
Before Uploading:
- ✅ Verify data source reliability
- ✅ Check for gaps in timestamps
- ✅ Ensure price data is adjusted for splits/dividends
- ✅ Validate volume data
- ✅ Test with small sample first
After Uploading:
- ✅ Run a quick backtest to verify data works
- ✅ Check results make sense
- ✅ Verify timestamp alignment
Common Data Sources
Where to Get Data
Free Sources:
- Yahoo Finance: Historical stock/ETF data
- Alpha Vantage: API for stocks, forex, crypto
- Binance: Crypto historical data
- Quandl: Economic and financial data
Paid Sources:
- Bloomberg: Professional market data
- Refinitiv: Financial market data
- Polygon.io: Real-time and historical data
- IEX Cloud: US stock market data
Exporting Data
Most sources let you download CSV files:
- Select symbol and timeframe
- Choose date range
- Download as CSV
- Upload to Lona
Tip: Save original files as backups before uploading.
Advanced Topics
Multi-Symbol Datasets
To test strategies across multiple symbols:
Option 1: Separate Uploads
- Upload each symbol individually
- Select multiple during execution
- Each symbol is a separate data source
Option 2: Combined File (Advanced)
- Include symbol identifier column
- More complex upload process
- Better for portfolio strategies
High-Frequency Data
For minute or tick data:
Considerations:
- Larger file sizes
- Longer upload times
- Longer backtest times
- More detailed results
Recommendations:
- Start with daily data
- Move to intraday after validating logic
- Use smaller date ranges for testing
Data Alignment
When using multiple data sources:
Lona Automatically:
- Aligns timestamps across sources
- Handles missing data points
- Synchronizes different frequencies
You Should:
- Use same timezone for all sources
- Ensure overlapping date ranges
- Verify data quality
Troubleshooting
”Upload Failed” Error
Causes & Solutions:
Invalid CSV Format:
- Check file is saved as CSV (not XLSX)
- Verify comma-separated (not semicolon or tab)
- Ensure UTF-8 encoding
File Too Large:
- Reduce date range
- Remove unnecessary columns
- Split into multiple files
Invalid Data:
- Check for non-numeric values in price columns
- Verify timestamps are valid dates
- Remove empty rows
”Invalid Column Mapping”
Problem: Required columns not mapped correctly
Solution:
- Ensure Timestamp and Close are mapped
- Verify column names match your file
- Check dropdown selections
”Duplicate Symbol Name”
Problem: Name already exists
Solution:
- Choose a different name
- Add distinguishing detail (date range, source)
- Delete old data source if replacing it
”Date Parsing Error”
Problem: Timestamps not recognized
Solution:
- Verify date format consistency
- Use standard format (YYYY-MM-DD)
- Check for invalid dates (Feb 30, etc.)
- Ensure timezone is correct
Data Upload Hangs
Problem: Upload process doesn’t complete
Solutions:
- Check internet connection
- Try smaller file
- Refresh and try again
- Clear browser cache
Quick Reference
OHLCV Data Checklist
- CSV file with headers
- Timestamp column
- Open, High, Low, Close columns
- Volume column (optional)
- Consistent date format
- No missing values
- Reasonable price ranges
- Meaningful symbol name
Custom Data Checklist
- CSV file with headers
- Timestamp column
- Value columns clearly named
- Numeric values where appropriate
- Consistent data types
- No missing timestamps
- Descriptive data source name
What’s Next?
Now that you understand data management:
- Canvas & Interface: Master the Lona UI
- Best Practices: Optimize your workflow
- Troubleshooting: Solve common issues
Next: Learn about the Canvas & Interface to navigate Lona efficiently.