SmartQuant Discussion

Automated Quantitative Strategy Development, SmartQuant Product Discussion and Technical Support Forums
It is currently Mon Nov 19, 2018 9:22 pm

All times are UTC + 3 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Fundamental Data Example
PostPosted: Wed Mar 28, 2018 11:12 am 
Offline

Joined: Tue Oct 13, 2009 12:19 pm
Posts: 235
Dear all,

does anyone could post me here an example on how to work with adding fundatmental data into the storage?

OQTeam: please can you add MarketCap and Outstanding shares to the Fundamental Data types?

Thanks
Mike


Top
 Profile  
 
PostPosted: Wed Mar 28, 2018 3:52 pm 
Offline

Joined: Wed May 05, 2010 9:49 pm
Posts: 441
Hello,
simple example:
Code:
          DateTime dateTime = DateTime.Now;

            Instrument instrument = framework.InstrumentManager.GetBySymbol("CSCO");

            //framework.DataManager.DeleteDataSeries(instrument, DataObjectType.Fundamental);

            for (int i = 0; i < 10000; i++)
            {
                Fundamental f = new Fundamental(dateTime.AddSeconds(i), ProviderId.IB, instrument.Id);

                for (byte j = 0; j < 10; j++)
                    f[j] = j;

                //Console.WriteLine(f);

               framework.DataManager.Save(instrument, f);
            }


You can add any field in table of fundamental:
Code:
Fundamental.AddField("fieldName", 123);


and access fields by name
Code:
fundamental["fieldName"]


Top
 Profile  
 
PostPosted: Thu Apr 05, 2018 7:21 pm 
Offline

Joined: Tue Oct 13, 2009 12:19 pm
Posts: 235
Thanks.

Makes sense now.

Could you please add to the FundmentalData these two:
'MarketCap'
'Shares Outstanding'

Then on another note, could you add to the DataManager the Method like GetFundamental(instrument) to get the latest Fundamental data. Similar to the method: GetBar(instrument); GetAsk(instrument)

Thanks
Mike


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 3 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group