Click here to Login

                                                   Database Snapshot Option


2018-04-26 11:59:53

Hi QS Team,

Can I set Snapshot option to TRUE for a database in order get "Point-in-time" feature?

Taking below example, would Simulator or Comp() take the 1st record when the date pointer located before 10-Feb-2016, but take the 3rd record while the date pointer located on or after 10-Feb-2016?

Fiscal Year End File Date Net Income Remark
31/12/2014 15/02/2015 1000000
31/12/2015 30/01/2016 200000
31/12/2014 10/02/2016 -1000000 Re-state

2018-04-27 03:47:49


I am not sure I understand your example but simulator or comp function will make sure to not have a look ahead bias.

The easiest way to test that is to plot the database data on a chart.

Regarding the "Snapshot" data, this has nothing to do with this. It just store the last date in a separate database for easier access. You can see our documentation to learn more about this.

2018-04-27 04:02:12


It is not look ahead, is actually happened.
The company restated some figure for 2014 report after they submitted 2015 report, that why I am asking how to deal with this kind of situation if I don't want to overwrite the original 2014 report.

2018-04-28 02:32:06


Best Answer
If the company updated previous data then simply enter the new data and a new date as you would.
You would not want to update the original record in order to create a "Point-in-time" database. You need all the data to be as originally reported.

2018-04-28 08:46:38


Sorry for my bad English, I couldn't described my problem clear enough.

Now I have 2 date field in the fundamental file:
- Fiscal Year-end Date (FyeDate)
- Filing Date (FileDate)

If I save FileDate -> Date
Comp() will align the data in below order:

FyeDate FileDate NetIncome Remark
1. 31/12/14 15/02/15 1000000
2. 31/12/15 30/01/16 200000
3. 31/12/14 10/02/16 -1000000. Re-state

If I save FyeDate -> Date
Comp() will align the data in below order:

FyeDate FileDate NetIncome Remark
1. 31/12/14 15/02/15 1000000
3. 31/12/14 10/02/16 -1000000. Re-state
2. 31/12/15 30/01/16 200000

I think saving FyeDate -> Date should be the correct way, right?
Now my problem is, Comp() will do the calculation bases on 3 records, instead of 2 at any given Point-In-Time.

Is there any parameters pass into Comp() let it pick the correct record based on date availability, eg:

any date before 09-02-15
1. 31/12/14 15/02/15 1000000
2. 31/12/15 30/01/16 200000

dated on or after 10-02-15:
3. 31/12/14 10/02/16 -1000000 Re-state
2. 31/12/15 30/01/16 200000

If the current Comp() function have no way to calculate Point-in-time data, then I have to maintain 2 sets of data:
1 original As-of-report dataset for backtesting purposes
1 Restated dataset for live trading

Is it right?

2018-04-30 08:48:56


Hi QS,

I got what you mean, the late coming 2014 report after 2015 Yearend report is totally useless, it would be easier just artificially shift the 2014 FileDate to 1 day before 2015 Fiscal Year Date, we keep the 2014 latest result just for our reference purposes.

No more messages


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"


Trading Items
Option Chains Data
Collar Option Strategy
Reverse Collar Option Strategy
Dow Jones U.S. Technology Sector Index Fund survivorship bias-fre...
Survivorship bias-free S&P 500 database downloader

How-to Lessons
How to quickly select stocks based on the last value of a databas...
How to import trades into a portfolio
How to quickly download the most recent EOD data for your stocks
How to use the Fibonacci retracement drawing tool
How to create a mobile database/account

Related Forum Threads
Create and Export each database for each market
Database File Locked
Delete symbols from Database
Composite tickers under custom database
Data from database of other account

Blog Posts
QS Trading Software: Database Optimization
Speed Up Optimizations by Saving Ranking Data into a Custom Datab...
How to Download and Use Fundamental Data
Download quotes, news, sentiment, fundamental... data using Quant...
Trading software new features

Create an account
Affiliate Program
Contact Us
Trading Forum
How-to Lessons
About Us
Terms of Use

Copyright 2024
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
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.