Click here to Login





                                                   Ingest earnings data from csv file ..

  0

0
Kiran
2016-07-30 14:07:38


I have sales surprise and earning surprise data to be ingested from a csv file, so i created a Custom Database with the following fields
- AnnouncementDate - could I reuse the pre-seeded Date field if possible, as there's no custom Date type available?
- Symbol (text)
- Earning surprise % (float)
- Sales surprise % (float)

I couldn't use the ASCII importer because it assumes a csv file for each symbol.

1) How do i import a csv file with 3000 line items in a custom database, each line containing a symbol, date and surprise numbers)?

2) Also, in Quantscript, how do i compare dates in the Buy condition? e.g.
Buy = (AnnouncementDate == today's date) && (+ve surprise condition);

thanks
Kiran



QuantShare
2016-07-31 08:24:41

  0

1/ The ASCII importer does not assumes a csv file for each symbol. You can just import one file containing all the symbols. That is why the "Symbol" field is present.

2/ You cannot compare dates. You can compare two "string".
But since the "announcement date" is the associated with your custom database date then QuantShare will do the synchronization.
Just use the getdata function to retrieve the surprise and that is it

buy = getdata("database name", "field name") > 10; // For example



Kiran
2016-08-01 19:54:09

  0

I created a database (with fields symbol, Date (pre-seeded), earningsurprise%, salessurprise%) and did an ASCII import (i set default value of 0 for last 2 fields). There's a potential issue, because the symbol column is blank - so, when i go to DatabaseEditor->Custom database Earning Surprises ->Choose Symbol 'ALJ', it shows 1 item for each symbol -e.g. for ALJ, I see
- Date 29/07/2016 00:00:00, easeningsurprise% -23.53, salessurprise 28.62%, symbol <blank>

When i use the following formula to plot the earningsurprise on the ALJ chart, i get NaN. I should get -23.53 on that date (and 0 on other dates)
//formula ..
eSurprise = getdata('surprises - earnings and sales', 'earningssurprise%');
Plot(eSurprise, "Earning surprise", colorBlue,ChartLine);

Please advise how to correct this so i can access the Earning Surprise field in Screens, Charts and in Strategies for the given date and symbol.

thanks
Kiran



QuantShare
2016-08-02 03:40:42

  0

Hi Kiran,

I am not sure I understand what exactly is the issue. Please send a copy of your ASCII file and some screenshots of the import process to support by email.



No more messages
0




Reply:

No html code. URLs turn into links automatically.

Type in the trading objects you want to include: - Add Objects
To add a trading object in your message, type in the object name, select it and then click on "Add Objects"










QuantShare

Trading Items
Portfolio Statistics to CSV File
UK Economic Data - Average Earnings Index
Historical Earnings Surprise, EPS and Consensus Data
Historical Earnings Calendar Data for U.S. Stocks - Date/Time and...
Market cap, ROE, ROA and Forward PE for U.S. Stocks - Fundamental...

How-to Lessons
How to import trading data from CSV files
How to export trading data to a CSV file
How to download and use U.S. stocks earnings data
How to download earnings calendar data for various stocks
How to quickly download the most recent EOD data for your stocks

Related Forum Threads
How do I Import Tick Data from a CVS file
Custom Date Format When Importing Data from CSV
update a new symbol from a csv file
How to import to database from a csv file?
Quotes in a CSV file

Blog Posts
Reading and Exporting Data from QuantShare to Excel Programmatica...
Export Trading Orders from a Portfolio to a File
How to create a trading system, screen and composite using earnin...
How to filter quotes data from high and low price spikes
6 places to download historical intraday Forex quotes data for fr...









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 2021 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.