Adding Stock Price Data

Learn how to import stock price data from spreadsheets into PairTradeScreener.

📋 Prerequisites

1Google Sheets account (free)
2Stock price data in spreadsheet format
3Required columns: symbol, date, open, high, low, close

1. Prepare Your Spreadsheet

Start by creating a Google Sheet with your stock price data. The data must follow a specific format to ensure proper import into the system.

📊 Required Column Structure:
symbol

Stock ticker (e.g., AAPL)

date

Date (YYYY-MM-DD)

open

Opening price

high

Highest price

low

Lowest price

close

Closing price

💡 Pro Tips:
  • • Use consistent date format (YYYY-MM-DD recommended)
  • • Ensure all price values are numeric (no currency symbols)
  • • Remove any empty rows or formatting
  • • Include at least 30 days of data for meaningful analysis

2. Publish as CSV

Once your spreadsheet is ready, you need to publish it as a CSV file to make it accessible via URL.

🔗 Publishing Steps:
  1. 1. In Google Sheets, go to File → Share → Publish to web
  2. 2. Select "Entire Document" and "CSV" format
  3. 3. Click "Publish" and confirm
  4. 4. Copy the generated CSV URL
⚠️ Important Notes:
  • • The URL will look like: https://docs.google.com/spreadsheets/d/.../pub?output=csv
  • • Anyone with the URL can access your data
  • • Updates to your sheet automatically update the CSV

3. Import to PairTradeScreener

Now it's time to import your stock data into the application using the CSV URL.

📥 Import Process:
  1. 1. Go to Stocks page in the application
  2. 2. Scroll to the "Google Sheet Fetcher" section
  3. 3. Paste your CSV URL into the input field
  4. 4. Click "Import from Google Sheets"
  5. 5. Wait for the import to complete
✅ Success Indicators:
  • • Green success message showing imported symbols and records
  • • Data appears in the stock table below
  • • Last updated timestamp is displayed

4. Set Up Auto-Refresh

Keep your stock data up-to-date by setting up automatic refresh intervals.

⏰ Auto-Refresh Setup:
  1. 1. Enter refresh interval in minutes (e.g., 60 for hourly)
  2. 2. Click "Set Timer" to activate
  3. 3. Monitor the auto-refresh status indicator
  4. 4. Use "Stop" button to disable when needed
🔄 Recommended Intervals:
  • 15-30 minutes: For active day trading
  • 1-4 hours: For swing trading
  • Daily: For long-term analysis
  • 0 (disabled): For manual updates only

5. Verify and Use Data

Ensure your imported data is working correctly and start using it for analysis.

🔍 Verification Steps:
  1. 1. Check the stock table shows your imported data
  2. 2. Verify symbol names and price ranges look correct
  3. 3. Test loading data for specific symbols
  4. 4. Try using the data in Pair Analyzer or Backtest tools
🚀 Next Steps:

🔧 Troubleshooting

❌ Common Issues:
Import Failed:

Check CSV URL is accessible and format matches requirements

Missing Data:

Verify all required columns exist and contain valid data

Auto-refresh Not Working:

Ensure interval is greater than 0 and timer is activated

Data Not Loading:

Try refreshing the page or resetting the database

🎯 What's Next?

Now that you have stock data imported, explore the full potential of PairTradeScreener with our comprehensive analysis tools and trading guides.