SmartQuant Discussion
http://www.smartquant.com/forums/

Fundamental Data Example
http://www.smartquant.com/forums/viewtopic.php?f=86&t=14811
Page 1 of 1

Author:  mikembb [ Wed Mar 28, 2018 11:12 am ]
Post subject:  Fundamental Data Example

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

Author:  skuvv [ Wed Mar 28, 2018 3:52 pm ]
Post subject:  Re: Fundamental Data Example

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"]

Author:  mikembb [ Thu Apr 05, 2018 7:21 pm ]
Post subject:  Re: Fundamental Data Example

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

Page 1 of 1 All times are UTC + 3 hours
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/