Click here to Login





How to download and use U.S. stocks earnings data

Updated on 2012-04-13 05:08:57

Share |

This article shows you:

- How to use a downloader to create and populate a custom database (with earnings data for instance)
- How to access this data using the QuantShare language

Even though this article deals with earnings data, the same logic can be applied to any other custom data.


Downloading Data

This downloader creates a custom database (earnings_cal), gets data from Rightline, parses it then saves it in your custom database.

Here is how to get historical earnings data:

- Go the following trading item page: Historical Earnings Calendar Data for U.S. Stocks - Date/Time and EPS
- Click on "Download" link (make sure you are logged in)
- Double click on the downloaded file to open QuantShare
- In QuantShare, click on "Download" in the new form then click on "Save Item"
- In the main menu, select "Download" then "Download Manager"
- Select "Earnings Calendar for US Stocks" item (the item you just downloaded)
- Click on "Open Selected Downloader"
- Select a start and end dates
- Click on "Start Downloading"


Display Earnings Calendar Data

To display the earnings data you have just downloaded:

- Select "Data" then "Edit Databases"
- Select "Custom" next to "Choose database"
- Select "earnings_cal" as database name
- Select a symbol under "Symbols" tab




You can export the data by clicking on "Export to CSV" button.


Plot Data on a Chart

- Open a chart, right click on it then select "Create a new pane"
- In the new pane, click on "Add Indicator" icon (first icon at the top of the pane)
- Select "Databases / Fields" tab
- Select "earnings_cal" database
- Select "eps" field (Earnings per share)
- Click on "OK"




Create a Trading System

Here is how to create a trading system based on the earnings calendar data.

This example will create a system that buys a stock when its earnings per share increases:

- Select "Analysis" then "Simulator"
- Click on "New" to create a new trading system
- Select "Create trading system using the formula editor"
- Type the following formula:

eps1 = GetData('earnings_cal', 'eps', Zero); // Get EPS Data
prevEPS1 = valuewhen(eps1 > 0, eps1, 2); // Previous EPS value
buy = eps1 > prevEPS1;


You can display buy signals on a chart, by right clicking on a pane, selecting "Edit Formula" then typing the above formula. You should also add the following line at the end of the formula:

plot(buy, "EPS Increase");









no reviews (Log in)







Other how-to articles




How to download earnings calendar data for various stocks





How to get fundamental data for U.S. Stocks





How to quickly download the most recent EOD data for your stocks





How to download EOD quotes for active and valid stocks only





How to download historical EOD data for penny stocks





How to create trading rules based on Put and Call volume data





How to use QuantShare with Metastock data





How to speed up watchlist and screener plug-ins when working with intraday data





How to screen for stocks having a high correlation with the Dow Jones index







QuantShare
Product
QuantShare
Features
Create an account
Affiliate Program
Support
Contact Us
Trading Forum
How-to Lessons
Manual
Company
About Us
Privacy
Terms of Use

Copyright © 2024 QuantShare.com
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
Google+
Follow us on Google+
RSS Trading Items



Trading financial instruments, including foreign exchange on margin, carries a high level of risk and is not suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to invest in financial instruments or foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with trading and seek advice from an independent financial advisor if you have any doubts.