1. 15 Jan, 2021 1 commit
  2. 07 Jan, 2021 7 commits
  3. 06 Jan, 2021 3 commits
  4. 18 Dec, 2020 8 commits
  5. 17 Dec, 2020 2 commits
  6. 21 Oct, 2020 1 commit
  7. 14 Oct, 2020 1 commit
  8. 08 Oct, 2020 2 commits
    • Stéphane Adjemian's avatar
      Added routines to convert dseries to lower frequencies. · 5aab3b5a
      Stéphane Adjemian authored
       - daily to monthly
       - daily or monthly to quaterly
      
      Conversion to annual frequency is not yet implemented, but this is
      enough to close #1.
      
      Four time aggregation methods are available:
      
       - 'sum' (aggregation of flow variables),
       - 'end-of-period' (aggregation of stock variables),
       - 'arithmetic-average', (aggregation of rates), and
       - 'geometric-average' (aggregation of ratios)
      
      Examples:
      
      >> a = dseries(rand(2*365+1,1), '2000-01-01')
      
      a is a dseries object:
      
                 | Variable_1
      2000-01-01 | 0.26032
      2000-01-02 | 0.56927
      2000-01-03 | 0.24877
      2000-01-04 | 0.3193
      2000-01-05 | 0.9108
      2000-01-06 | 0.88522
      2000-01-07 | 0.79459
      2000-01-08 | 0.92581
      2000-01-09 | 0.17884
      2000-01-10 | 0.51754
                 |
      2001-12-21 | 0.035016
      2001-12-22 | 0.03975
      2001-12-23 | 0.98857
      2001-12-24 | 0.68618
      2001-12-25 | 0.37669
      2001-12-26 | 0.50432
      2001-12-27 | 0.7635
      2001-12-28 | 0.048875
      2001-12-29 | 0.72593
      2001-12-30 | 0.70133
      2001-12-31 | 0.45889
      
      >> dseries2Q(a, 'sum')
      
      ans is a dseries object:
      
             | Variable_1
      2000Q1 | 46.6096
      2000Q2 | 45.1456
      2000Q3 | 45.0172
      2000Q4 | 47.6164
      2001Q1 | 49.9093
      2001Q2 | 46.2334
      2001Q3 | 47.4685
      2001Q4 | 47.1611
      
      >> dseries2M(a, 'sum')
      
      ans is a dseries object:
      
              | Variable_1
      2000M1  | 16.7499
      2000M2  | 15.4311
      2000M3  | 14.4286
      2000M4  | 14.3583
      2000M5  | 15.7072
      2000M6  | 15.0801
      2000M7  | 14.2406
      2000M8  | 15.9174
      2000M9  | 14.8592
      2000M10 | 17.5525
      2000M11 | 13.3236
      2000M12 | 16.7404
      2001M1  | 18.9293
      2001M2  | 16.1282
      2001M3  | 14.8518
      2001M4  | 16.9843
      2001M5  | 14.5768
      2001M6  | 14.6723
      2001M7  | 14.9768
      2001M8  | 15.3968
      2001M9  | 17.0949
      2001M10 | 15.0376
      2001M11 | 16.6848
      2001M12 | 15.4388
      
      >> dseries2Q(dseries2M(a, 'sum'), 'sum')
      
      ans is a dseries object:
      
             | Variable_1
      2000Q1 | 46.6096
      2000Q2 | 45.1456
      2000Q3 | 45.0172
      2000Q4 | 47.6164
      2001Q1 | 49.9093
      2001Q2 | 46.2334
      2001Q3 | 47.4685
      2001Q4 | 47.1611
      5aab3b5a
    • Stéphane Adjemian's avatar
  9. 07 Oct, 2020 2 commits
  10. 02 Oct, 2020 12 commits
  11. 01 Oct, 2020 1 commit