FIDAL - Financial Data Access Library

  Home | Documentation | Download
 

 

Simulated Data Source

1.0 Introduction

2.0 FD_SIM_REF Category

3.0 FD_SIM_MRG Category

4.0 FD_AddDataSource Parameters Details

horizontal rule

1.0 Introduction

For the purpose of testing, this simulated read-only data source provides some samples of financial data. This data source allows to make testing without having a real data source.

This simulated data source is used for the self-testing, regression testing and demo of the FIDAL.

There is no need for any external file. All the data is embedded within the library. In other word, you can assume that this data is always available when linking to the library.

The simulated database contains only two categories: FD_SIM_REF and FD_SIM_MRG

horizontal rule

2.0 FD_SIM_REF Category

This category contains only 2 pre-defined symbol: "DAILY_REF_0" and "INTRA_REF_0".

DAILY_REF_0 provides 252 price bar of a real life stock (one complete year). Each bar provides: Date, Open, High, Low, Close and Volume.

INTRA_REF_0 provides 34 price bars (10 minutes interval) corresponding to an intra-day of the Dow Industrial index . Each bar provides: Date, Time, Open, High, Low, Close

Making test having a dependency on these values shall be safe. Consequently, if different data are needed, new reference will be added and the old ones will be left untouched.

horizontal rule

3.0 FD_SIM_MRG

This category contains only one symbol used specifically to test the merging capability of the FIDAL. There is very little interest for a user of the FIDAL to use that category. This category is visible only if the param.info parameter (of FD_AddDataSource) is not NULL.

The symbol is called "MRG_0". When merging "MRG_0" from 4 distinct data-source (who were added with a distinctive "param.info" parameter), the resulting merge is a pre-defined pattern. If there is a difference with the expected pattern, it means the software logic of the merge is broken.

The symbol contains exactly 1000 price bar. The expected pattern is:

bullet

Low goes from 1000.0001 to 1999.1000

bullet

Open goes from 2000.0001 to 2999.1000

bullet

Close goes from 3000.0001 to 3999.1000

bullet

High goes from 4000.0001 to 4999.1000

bullet

Volume goes from 5000 to 5999

bullet

OpenInterest goes from 6000 to 6999

bullet

Daily timestamp are starting at an arbitrate date.

As you can see, each value in the price bar is going up in increment of 1.0001
With this scheme, no two values are identical.

Note: In case you did not understood, if you are reading only one of the MRG_0 from one datasource, you will NOT see the expected pattern. You must merge the 4 instances of the MRG_0 to reveal the expected pattern.

horizontal rule

4.0 FD_AddDataSource Parameters Details

Here are a quick overview of how each FD_AddDataSource parameters are used for this data source:

'param.id'
Must be FD_SIMULATOR

'param.location'
Unused. Must be NULL.

'param.info'
If you are using only FD_SIM_REF, set this parameter to NULL. If you are using both FD_SIM_REF and FD_SIM_MRG, you must pass one of the following string: "1", "2", "3" or "4".

'param.category', 'param.country', 'param.exchange', 'param.type',
Unused. Must be NULL.

'param.username', 'param.password'
Unused. Must be NULL.

'param.flags'
That parameter shall be FD_NO_FLAGS.

Google  SourceForge Logo
  Web FidalSoft.org
 

Copyright© 2006 TicTacTec LLC. All Rights Reserved. Last Update: 07/21/06, Unique Visitor: