Exemplo n.º 1
0
        private static CorporateFactorProvider GetFactorFile_LODE20191127()
        {
            const string factorFileContents = @"
19980102,1,5,8.5,qq
20171109,1,5,0.12,qq
20501231,1,1,0,qq
";
            DateTime?    factorFileMinimumDate;
            var          reader         = new StreamReader(factorFileContents.ToStream());
            var          enumerable     = new StreamReaderEnumerable(reader).Where(line => line.Length > 0);
            var          factorFileRows = CorporateFactorRow.Parse(enumerable, out factorFileMinimumDate);

            return(new CorporateFactorProvider("lode", factorFileRows, factorFileMinimumDate));
        }
Exemplo n.º 2
0
        private static CorporateFactorProvider GetFactorFile_AAPL2018_05_11()
        {
            const string factorFileContents = @"
19980102,0.8893653,0.0357143,16.25
20000620,0.8893653,0.0357143,101
20050225,0.8893653,0.0714286,88.97
20120808,0.8893653,0.142857,619.85
20121106,0.8931837,0.142857,582.85
20130206,0.8972636,0.142857,457.285
20130508,0.9024937,0.142857,463.71
20130807,0.908469,0.142857,464.94
20131105,0.9144679,0.142857,525.58
20140205,0.9198056,0.142857,512.59
20140507,0.9253111,0.142857,592.34
20140606,0.9304792,0.142857,645.57
20140806,0.9304792,1,94.96
20141105,0.9351075,1,108.86
20150204,0.9391624,1,119.55
20150506,0.9428692,1,125.085
20150805,0.9468052,1,115.4
20151104,0.9510909,1,122.01
20160203,0.9551617,1,96.34
20160504,0.9603451,1,94.19
20160803,0.9661922,1,105.8
20161102,0.9714257,1,111.6
20170208,0.9764128,1,132.04
20170510,0.9806461,1,153.26
20170809,0.9846939,1,161.1
20171109,0.9885598,1,175.87
20180208,0.9921138,1,155.16
20180510,0.9961585,1,190.03
20501231,1,1,0
";

            DateTime?factorFileMinimumDate;
            var      reader         = new StreamReader(factorFileContents.ToStream());
            var      enumerable     = new StreamReaderEnumerable(reader).Where(line => line.Length > 0);
            var      factorFileRows = CorporateFactorRow.Parse(enumerable, out factorFileMinimumDate);

            return(new CorporateFactorProvider("aapl", factorFileRows, factorFileMinimumDate));
        }
Exemplo n.º 3
0
        // AAPL experiences a 0.73 dividend distribution on 2018.05.11
        private static CorporateFactorProvider GetFactorFile_AAPL2018_05_08()
        {
            const string factorFileContents = @"
19980102,0.8927948,0.0357143,16.25
20000620,0.8927948,0.0357143,101
20050225,0.8927948,0.0714286,88.97
20120808,0.8927948,0.142857,619.85
20121106,0.8966279,0.142857,582.85
20130206,0.9007235,0.142857,457.285
20130508,0.9059737,0.142857,463.71
20130807,0.9119721,0.142857,464.94
20131105,0.9179942,0.142857,525.58
20140205,0.9233525,0.142857,512.59
20140507,0.9288793,0.142857,592.34
20140606,0.9340673,0.142857,645.57
20140806,0.9340673,1,94.96
20141105,0.9387135,1,108.86
20150204,0.942784,1,119.55
20150506,0.9465051,1,125.085
20150805,0.9504563,1,115.4
20151104,0.9547586,1,122.01
20160203,0.9588451,1,96.34
20160504,0.9640485,1,94.19
20160803,0.9699181,1,105.8
20161102,0.9751718,1,111.6
20170208,0.9801781,1,132.04
20170510,0.9844278,1,153.26
20170809,0.9884911,1,161.1
20171109,0.992372,1,175.87
20180208,0.9959397,1,155.16
20501231,1,1,0
";

            DateTime?factorFileMinimumDate;
            var      reader         = new StreamReader(factorFileContents.ToStream());
            var      enumerable     = new StreamReaderEnumerable(reader).Where(line => line.Length > 0);
            var      factorFileRows = CorporateFactorRow.Parse(enumerable, out factorFileMinimumDate);

            return(new CorporateFactorProvider("aapl", factorFileRows, factorFileMinimumDate));
        }