Skip to Content
Platform FeaturesData Management

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

  1. Click Data in the left sidebar
  2. Click the Upload button (+ icon)
  3. Upload dialog opens

Step 1: Select Your File

Supported Format: CSV (Comma-Separated Values)

How to Upload:

  1. Drag and drop a CSV file into the upload area, or
  2. 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,1000000

Example without headers:

2023-01-01,100.5,101.2,100.1,100.8,1000000

Tip: 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:

  1. For each field, select the corresponding column from dropdown
  2. If column doesn’t exist in your file, select “none
  3. 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.68

Map:

  • Timestamp → date
  • Custom columns → sentiment_score, mention_count, positive_ratio

Step 5: Review and Upload

  1. Review all settings in the dialog
  2. Check the preview one more time
  3. 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,1200000

Requirements:

  • ✅ 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, 2023

Date 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 AM

With Timezone:

2023-01-01 09:30:00 UTC 2023-01-01 09:30:00-05:00 2023-01-01T09:30:00Z

Best 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 notation

Invalid Price Values:

$100.50 ❌ Currency symbol 100,50 ❌ Comma as decimal separator N/A ❌ Non-numeric

Volume Format:

  • Whole numbers: 1000000
  • Can include decimals: 1000000.5
  • No commas: Use 1000000 not 1,000,000

Managing Your Data

Viewing Data Sources

  1. Navigate to Data section
  2. 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:

  1. Click the Edit icon (pencil)
  2. Modify metadata:
    • Change name
    • Update description
    • Adjust frequency
    • Change timezone
  3. Save changes

Note: You cannot edit the actual data values, only metadata. To change data, delete and re-upload.

Deleting Data

  1. Find your uploaded data source
  2. Click Delete icon (trash)
  3. Confirm deletion
  4. ⚠️ 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:

  1. Select symbol and timeframe
  2. Choose date range
  3. Download as CSV
  4. 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:

  1. Check internet connection
  2. Try smaller file
  3. Refresh and try again
  4. 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:


Next: Learn about the Canvas & Interface to navigate Lona efficiently.

Last updated on