-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathChangeLog
4447 lines (2832 loc) · 136 KB
/
ChangeLog
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
2025-04-19 Enrico Schumann <[email protected]>
* R/rebalance.R (print.rebalance): set scipen to 9999,
since higher values trigger a warning in R 4.5
* R/journal.R (print.journal): set scipen to 9999
2025-04-18 Enrico Schumann <[email protected]>
* R/journal.R (print.journal): protect against
invalid journals that lack required fields such as
"amount"
* R/pl.R (print.pl): set scipen to 9999, since
higher values trigger a warning in R 4.5
2025-04-17 Enrico Schumann <[email protected]>
* R/position.R (position.data.frame): add method,
similar to `pl.data.frame`, added 2017-12-08
2025-04-14 Enrico Schumann <[email protected]>
* R/position.R (position.default): fix handling of
character timestamps (or of other non-numeric
classes) that won't work with `findInterval`,
through locally mapping them to numeric via `xtfrm`
2025-04-07 Enrico Schumann <[email protected]>
* R/journal.R (print.summary.journal): new arguments
"columns" and "column.headers", which specify which
columns should be printed
2025-03-14 Enrico Schumann <[email protected]>
* R/NAVseries.R (as.data.frame.summary.NAVseries):
remove unused code; simplify method
2024-12-06 Enrico Schumann <[email protected]>
* R/unit_prices.R (unit_prices): fix error message
2024-12-04 Enrico Schumann <[email protected]>
* man/rebalance.Rd: fix documentation
2024-11-08 Enrico Schumann <[email protected]>
* R/btest.R: handle corner cases with initial
position, NAs in prices without position and burnin
of 0
2024-10-30 Enrico Schumann <[email protected]>
* R/NAVseries.R (as.NAVseries.zoo): 'instrument',
'title' and 'description' are now passed on to
'NAVseries'
(as.data.frame.summary.NAVseries): 'as.data.frame'
method for summaries of NAVseries is exported
2024-10-19 Enrico Schumann <[email protected]>
* DESCRIPTION (Version): 1.0-1
* README.md: change SSRN-URL to DOI, as requested
by CRAN
2024-10-19 Enrico Schumann <[email protected]>
* DESCRIPTION (Version): 1.0-0
2024-10-16 Enrico Schumann <[email protected]>
* R/returns.R (returns): set 'na.rm' to FALSE
2024-09-25 Enrico Schumann <[email protected]>
* R/returns.R (returns,returns_position): no
longer ignore argument 'pad' when no rebalancing
takes place
(returns,pReturns): no longer ignore 'na.rm' for
period 'total'
2024-09-17 Enrico Schumann <[email protected]>
* DESCRIPTION (Version): 0.19-6
2024-09-13 Enrico Schumann <[email protected]>
* R/pricetable.R (pricetable.zoo): support
multivariate zoo series
2024-08-19 Enrico Schumann <[email protected]>
* inst/tinytest/test_pl.R: add simple tests for
low-level profit/loss computation, which was
changed on 2024-08-18 (see ChangeLog)
2024-08-18 Enrico Schumann <[email protected]>
* R/pl.R (.pl): compute profit/loss with %*%
2024-07-28 Enrico Schumann <[email protected]>
* R/unit_prices.R (unit_prices): add arguments
'round.price' and 'round.units'
2024-07-24 Enrico Schumann <[email protected]>
* R/unit_prices.R (unit_prices): refactor function
and add more checks; in particular, check if 'NAV'
is sorted by time
(.unit_prices): remove unexported function, which
has been deprecated since 2020; see ChangeLog
2020-11-22
* man/unit_prices.Rd: update docs
2024-07-22 Enrico Schumann <[email protected]>
* R/returns.R (print.p_returns): fix printing of
returns for period "total/itd" when no timestamp is
supplied
* R/unit_prices.R (unit_prices): rename argument
'initial.shares' to 'initial.units', and support
computation
* R/returns.R (returns.default): add a warning when
there are NAs in "x" and "na.rm" is missing
2024-07-21 Enrico Schumann <[email protected]>
* DESCRIPTION (Version): 0.19-5
* man/pricetable.Rd: add link to 'zoo' package
2024-05-28 Enrico Schumann <[email protected]>
* R/NAVseries.R (as.NAVseries.zoo): split
multivariate zoo-series into a list of NAVseries
2024-05-08 Enrico Schumann <[email protected]>
* R/btest.R (btest): delete branch 'btest_na_rm',
as there cannot be reliable support for handling
NAs. NAs in price series have been 'tolerated' for
some time, as long as there are no positions in
such series; see ChangeLog 2018-08-21, 2022-06-23.
2024-05-07 Enrico Schumann <[email protected]>
* R/journal.R
(instrument.NAVseries,`instrument<-.NAVseries`):
add methods
2024-02-23 Enrico Schumann <[email protected]>
* R/rc.R (rc): factor out logarithmic-linking
computations
2024-02-20 Enrico Schumann <[email protected]>
* R/rc.R (rc): add new linking methods -- supported
for contribution are now 'geometric{0,1,0.5}' and
'logarithmic'
(rc): method "attribution" now implements
/relative/ contributions; so far, only logarithmic
linking is implemented for that method
2024-01-24 Enrico Schumann <[email protected]>
* R/is_valid_ISIN.R (is_valid_ISIN): propagate NAs
properly, i.e. NA values now evaluate to NA; when
new argument "NA.FALSE" is TRUE, then NA evaluates
to FALSE. (This behaviour is consistent with
"is_valid_SEDOL".)
2023-12-28 Enrico Schumann <[email protected]>
* R/rc.R (rc): fix ordering of returns when timestamp
is unsorted (not relevant for single-period
contributions, but affects overall contributions)
* inst/tinytest/test_rc.R: add tests with unsorted
timestamps
2023-12-27 Enrico Schumann <[email protected]>
* R/returns.R (returns.zoo): pass on "na.rm" argument
2023-12-08 Enrico Schumann <[email protected]>
* DESCRIPTION (Version): 0.19-4
2023-11-14 Enrico Schumann <[email protected]>
* R/position.R (position.default): rewrite 'position',
relying on 'findInterval'
2023-10-19 Enrico Schumann <[email protected]>
* DESCRIPTION (Version): 0.19-3
2023-09-29 Enrico Schumann <[email protected]>
* DESCRIPTION (Version): 0.19-2
* R/internal.R (.isFALSE): remove .isFALSE and
replace by isFALSE, introduced in R 3.5
* DESCRIPTION (Depends): the package depends on
R >= 3.5, because it uses \doi{} in the docs.
* man/PMwR-internal.Rd: add \alias{`.timestamp<-`},
as required by changed tools::checkDocFiles() and
tools::checkRdContents()
* inst/tinytest/test_pl_print.R: add test for pl
printing
* R/returns.R (print.p_returns): fix message for
annualised returns in case timestamp is of class
'yearmon' or 'yearqtr' (from package 'zoo')
* vignettes/*: remove 'fontenc'
2023-09-28 Enrico Schumann <[email protected]>
* R/pl.R (print.pl): fix printing in case of initial
position but no trades in journal [this bug had been
introduced in 2022-12-05; only printing was affected,
not the actual computations]
(print.pl): merge related footnotes
* R/rebalance.R (print.rebalance): drop dimension of
"notional"
2023-07-07 Enrico Schumann <[email protected]>
* R/journal.R (as.journal.journal): calling
as.journal on a journal is a no-op now; before,
it raised an error
2023-06-08 Enrico Schumann <[email protected]>
* R/trades.R (split_trades): add argument
'drop.zero', for removing trades with zero-amounts.
Also add examples and tests.
2023-06-05 Enrico Schumann <[email protected]>
* DESCRIPTION (Version): 0.19-1
* NAMESPACE: '.expand' and '.tree' are no longer
exported
2023-06-02 Enrico Schumann <[email protected]>
* R/journal.R (journal.position): the first
argument of journal.position is now named 'amount',
in alignment with the generic
* NAMESPACE: register 'journal.position'
2023-06-01 Enrico Schumann <[email protected]>
* DESCRIPTION (Depends): the package depends on
R >= 3.3, because it uses \doi{} in the docs
2023-05-31 Enrico Schumann <[email protected]>
* DESCRIPTION (Version): 0.19-0. This version is
intended to be the last release before version 1.0.
* inst/CITATION: use 'bibentry'
2023-03-01 Enrico Schumann <[email protected]>
* R/rc.R (rc): compute only with those returns for
which weights are non-zero, as defined by a new
argument 'tol'; thus, irrelevant NAs no longer
affect results
2023-02-17 Enrico Schumann <[email protected]>
* man/unit_prices.Rd: remove reference to
".unit_prices", which had been deprecated since
2020 (see ChangeLog entry 2020-11-22)
2023-02-10 Enrico Schumann <[email protected]>
* R/returns.R (t.p_returns): add method for
holding-period returns. Primarily required for
handling dim names when printing returns.
* NAMESPACE: register method "t.p_returns"
2022-12-05 Enrico Schumann <[email protected]>
* R/returns.R (returns.default, returns.zoo)
(returns.NAVseries): add argument 'na.rm',
currently with default TRUE. This expected to
change in a future release.
* R/pl.R (.pl): the behaviour for zero-length
vector is now documented (i.e. a profit/loss of
zero, which is in the same spirit as
'sum(numeric(0))')
(pl): support empty journals and zero-length
amounts when 'along.timestamp' is TRUE. The result
is an 'pl' object with zero-length components 'pl',
'unrealised', etc. Empty journals will be handled
in 'pl.default'.
2022-11-29 Enrico Schumann <[email protected]>
* R/btest.R (btest): 'do.rebalance' may return a
vector of length equal to the number of assets,
indicating which assets to rebalance (before, the
function had to return a vector of length one)
* R/returns.R (returns.default): fix warnings
in situations when 'period' has length > 1
2022-11-03 Enrico Schumann <[email protected]>
* NAMESPACE: import "as.Date.yearmon" and
"as.Date.yearqtr" from package "zoo"
2022-10-19 Enrico Schumann <[email protected]>
* DESCRIPTION (Version): 0.18-0
2022-10-18 Enrico Schumann <[email protected]>
* man/is_valid_ISIN.Rd: update links
2022-10-13 Enrico Schumann <[email protected]>
* R/internal.R (.may_be_Date): in R-devel,
as.Date(1) no longer fails but evaluates to a
Date. Function '.may_be_Date' now labels Dates
and character vectors/factors that can be
coerced with as.Date. All other vectors are
FALSE (in particular, numeric vectors).
2022-08-25 Enrico Schumann <[email protected]>
* R/position.R (position): if 'when' is not
specified, timestamps are now effectively
ignored, even if they are NA
2022-06-23 Enrico Schumann <[email protected]>
* R/btest.R (btest): rebalance arithmetic is
performed only for positions with non-zero change
also in period 1, i.e. the (rare) case when burn-in
is 0, which allows NAs in prices (for periods > 1,
this behaviour had been introduced in 2018-08-21)
2022-06-03 Enrico Schumann <[email protected]>
* R/btest.R (btest): fix edge case when an initial
position exists but no trade takes place
2022-06-01 Enrico Schumann <[email protected]>
* R/streaks.R (streaks): pass argument 'relative'
in 'zoo' method
2022-05-29 Enrico Schumann <[email protected]>
* R/streaks.R (streaks): add argument 'relative',
with default TRUE (which is current behaviour). If
FALSE, the function looks at differences instead of
relative changes (returns).
2021-10-19 Enrico Schumann <[email protected]>
* DESCRIPTION (Version): 0.17-0
2021-09-26 Enrico Schumann <[email protected]>
* man/returns.Rd: describe "ytd!" in docs
2021-09-18 Enrico Schumann <[email protected]>
* DESCRIPTION (Version): 0.16-1
[bug-fix release, built directly "on top" of
version 0.16-0]
* R/position.R: convert to Date via as.POSIXlt(....).
This fixes the computation of dates from timestamps
in certain locales (timezones with large UTC
offsets) in case the "when" keyword was used.
2021-09-15 Enrico Schumann <[email protected]>
* R/internal.R (.match_or_next): new argument
'fastmatch', with default FALSE
(.match_or_previous): new argument 'fastmatch',
with default FALSE
2021-08-17 Enrico Schumann <[email protected]>
* R/rebalance.R (print.rebalance): fix print
method for subsetting
2021-08-13 Enrico Schumann <[email protected]>
* R/rebalance.R (print.rebalance): do no longer
ignore 'multiplier' when computing values in
print method
2021-07-07 Enrico Schumann <[email protected]>
* R/returns.R (returns): avoid warnings when
computing holding-period returns when 'period'
of is length greater than one
2021-03-21 Enrico Schumann <[email protected]>
* R/rc.R (rc): [experimental] 'rc' gains limited
support for attribution (currently for a single
period only); the function gains several arguments
for providing necessary information, such as 'R.bm'
and 'weights.bm'
2021-02-22 Enrico Schumann <[email protected]>
* R/returns.R (returns_position): warn if there
are NAs at rebalancing timestamps
2021-01-19 Enrico Schumann <[email protected]>
* DESCRIPTION (Version): 0.16-0
2021-01-17 Enrico Schumann <[email protected]>
* R/returns.R (returns.default): specially handle
numeric/integer timestamps, so that a numeric
'rebalance.when' will be matched against an
integer 't'
2021-01-15 Enrico Schumann <[email protected]>
* R/returns.R (returns.default): coerce 'x' to
matrix if 'returns_position' is called
2021-01-12 Enrico Schumann <[email protected]>
* R/returns.R (returns_position): zero positions
now correctly return zero returns (instead of NaN)
2021-01-10 Enrico Schumann <[email protected]>
* R/unit_prices.R (unit_prices): support 'cf.included'
* R/div_adjust.R (div_adjust): allow duplicated
timestamps, i.e. several payments on a single
date; update docs
* inst/tinytest/test_div_adjust.R: add tests
* inst/tinytest/test_split_adjust.R: add tests
2021-01-02 Enrico Schumann <[email protected]>
* R/returns.R (returns_position): add internal
function for computing rebalanced returns, for
both fixed weights and fixed positions. No longer
use internal function 'returns_rebalance'.
* R/returns.R: remove 'twReturns'
* R/internal.R (.copy_fw, .copy_fw_matrix): add
internal functions
2020-11-22 Enrico Schumann <[email protected]>
* R/unit_prices.R (unit_prices): the function
now supports cashflows for different
ids/accounts, even on the same timestamp. Fewer
columns are now returned, with an attribute
'transactions' attached: a data.frame of the
transactions, for each id/account.
The old function definition can still be accessed
with
PMwR:::.unit_prices>
but this will be removed in a future version.
Argument 'cf.included' it not (yet) supported
right now.
2020-10-20 Enrico Schumann <[email protected]>
* DESCRIPTION (Version): 0.15-1
* R/div_adjust.R (div_adjust): fix handling of
dividends that include first observation as
timestamp
2020-10-19 Enrico Schumann <[email protected]>
* DESCRIPTION (Version): 0.15-0
2020-10-14 Enrico Schumann <[email protected]>
* R/journal.R (head.journal, tail.journal): set
default value for argument 'by' to
"instrument"; if 'by' is TRUE (the old
default), set it to "instrument"
2020-10-12 Enrico Schumann <[email protected]>
* R/journal.R (summary.journal): rewrite and
document method
2020-10-10 Enrico Schumann <[email protected]>
* R/position.R (position): support "endofyear"
as keyword for 'when'
2020-10-01 Enrico Schumann <[email protected]>
* inst/tinytest/test_is_valid_SEDOL.R: add tests
2020-09-25 Enrico Schumann <[email protected]>
* R/is_valid_ISIN.R (is_valid_SEDOL): add function
2020-08-22 Enrico Schumann <[email protected]>
* R/valuation.R (valuation): rename argument
price.table => vprice
* R/pricetable.R (`[.pricetable`): subsetting a
pricetable gains a new argument 'as.matrix', with
default TRUE.
* R/pl.R (pl.default): check if custom
valuation dates passed via 'along.timestamp'
are in ascending order (and sort them if they
are not)
2020-08-12 Enrico Schumann <[email protected]>
* R/journal.R (journal.default): do not recycle
journal inputs (i.e. do not use 'rep') when
they already are of appropriate length
2020-08-09 Enrico Schumann <[email protected]>
* DESCRIPTION (Depends): require at least R
version 3.2, which was released in 2015 ('lengths'
was added in that version)
2020-05-26 Enrico Schumann <[email protected]>
* R/valuation.R (valuation.position): add
argument 'use.names'. If TRUE, the (column)
names of 'price.table' are matched against
'instrument'.
2020-05-17 Enrico Schumann <[email protected]>
* R/pl.R (pl): fix profit/loss computation when
'along.timestamp' specifies a single timestamp
2020-05-16 Enrico Schumann <[email protected]>
* R/valuation.R (valuation.position): for a
single timestamp and a named position,
'price.table' may now also be a named vector;
see Examples in ?valuation
2020-04-29 Enrico Schumann <[email protected]>
* R/rebalance.R (rebalance): warn about NAs in
'price' vector
* R/scale1.R (scale1.zoo): fix handling of
'zoo' series when index is of class 'character'
2020-03-11 Enrico Schumann <[email protected]>
* DESCRIPTION (Version): 0.14-0
2020-03-10 Enrico Schumann <[email protected]>
* R/btest.R (do.rebalance): fixed -- 'btest'
did not work properly with 'do.rebalance' set
to "firstofquarter" or "lastofquarter" (thanks
to Lutchmie Narine for reporting)
2020-03-03 Enrico Schumann <[email protected]>
* DESCRIPTION (Suggests): remove 'RUnit'
* inst/tinytest/*: move all tests to tinytest format
2020-03-01 Enrico Schumann <[email protected]>
* R/div_adjust.R (split_adjust): support several
splits on a single timestamp
2020-02-24 Enrico Schumann <[email protected]>
* R/pl.R (pl.default): use 'vprice' only if it
is actually specified, which avoids unnecessary
NAs in average buy/sell prices
2020-02-19 Enrico Schumann <[email protected]>
* R/returns.R (returns,returns_rebalance):
the 'weights' argument needs no longer sum to one
2020-02-18 Enrico Schumann <[email protected]>
* R/streaks.R (streaks): relative streaks are
now computed via geometric returns (i.e. ratios
need to exceed thresholds), so that return
computations are consistent
2020-01-21 Enrico Schumann <[email protected]>
* R/streaks.R (streaks): remove argument
'return.arithmetic' (see ChangeLog 2020-01-07).
The alternative return computations are added as
examples.
* R/NAVseries.R (summary.NAVseries): if a
benchmark is present, an attribute 'bm' is
added
(toLatex.summary.NAVseries): new argument
'include.bm', with default FALSE
2020-01-17 Enrico Schumann <[email protected]>
* R/NAVseries.R (toLatex.summary.NAVseries):
new argument 'include.bm', with default FALSE
2020-01-16 Enrico Schumann <[email protected]>
* R/btest.R (btest): for consistency, even
replicate if replications == 1; reverts changes
of 2020-01-02
2020-01-07 Enrico Schumann <[email protected]>
* R/streaks.R (streaks.default): new argument
'return.arithmetic', which specifies how
reported streak returns are computed
* R/journal.R (summary.journal)
(print.summary.journal): allow aggregation of
journal by timestamp and instrument
2020-01-03 Enrico Schumann <[email protected]>
* R/scale1.R (scale1.default): the default
method now also works for data.frames
* R/returns.R (returns.data.frame): fix method
for cases when holding-period results in a
single number, such as annual. The result is
then an atomic vector, not a data.frame.
* R/internal.R (make_neighbour): move code --
into package 'neighbours' [ repository at
https://github.com/enricoschumann/neighbours ]
2020-01-02 Enrico Schumann <[email protected]>
* R/btest.R (btest): replicate only if
'replications' > 1L
2019-12-03 Enrico Schumann <[email protected]>
* R/position.R (as.matrix.position): only use
timestamp for row.names if it is not NA
(as.data.frame.position): only use timestamp
for row.names if it is not NA, and check for
uniqueness
(as.data.frame.position): arguments passed via
... are passed on to 'as.data.frame'
(Ops.position): support unary `!`: the result
is a logical matrix of the same dimension as
the original position
2019-11-08 Enrico Schumann <[email protected]>
* R/btest.R (btest): 'variations.settings' with
new option 'expand.grid'. If FALSE, do not
compute combinations of variations. See
https://enricoschumann.net/notes/backtest-strategy-on-different-datasets.html
for an example.
2019-11-07 Enrico Schumann <[email protected]>
* DESCRIPTION (Enhances): remove 'zoo' from
'Enhances' since it is already in 'Imports'
* R/streaks.R (streaks): set default value for
'down' to '-up', in all methods
2019-11-05 Enrico Schumann <[email protected]>
* R/streaks.R: add argument 'y'. If not NULL,
returns of 'x' are computed relative to 'y'.
2019-10-30 Enrico Schumann <[email protected]>
* DESCRIPTION (Enhances): add 'zoo'
2019-10-19 Enrico Schumann <[email protected]>
* DESCRIPTION (Version): 0.13-0
* DESCRIPTION (Suggests): use 'tinytest', but
keep 'RUnit' (for now)
* R/journal.R (`[.journal`): rename 'reverse'
to 'invert' [the name 'reverse' rather implied
reversing the order, not inverting the
selection]. Also, apply inversion to numeric
and logical subsetting (it had only worked for
character arguments)
2019-10-09 Enrico Schumann <[email protected]>
* R/btest.R: fixed -- with an initial position
specified and burn-in set to zero, the suggested
position should equal the initial position
2019-10-08 Enrico Schumann <[email protected]>
* R/NAVseries.R (lines.NAVseries): add 'lines'
method
2019-10-05 Enrico Schumann <[email protected]>
* R/NAVseries.R (window.NAVseries): fix method,
which did not work properly when 'start' or
'end' were not included in 'timestamp'
* R/position.R (.compare_position): add draft
of function, useful when positions are
specified as weights
(position): experimental -- new attribute
"unit": a position might be something other
than "amount"; for instance, "weight" or
"notional"
* R/returns.R (returns): "total" is now an
alias for "itd"
2019-08-26 Enrico Schumann <[email protected]>
* DESCRIPTION (Version): 0.12-0
2019-08-22 Enrico Schumann <[email protected]>
* R/returns.R (returns.zoo): fixed -- with a
lag different from 1 (and no padding), the
timestamp of the resulting returns series was
wrong
2019-08-08 Enrico Schumann <[email protected]>
* R/btest.R (btest): 'btest' now checks the
'dim' attribute of 'prices' (after having them
unlisted, in the case of several assets). If
none is found, 'as.matrix' is called. See
ChangeLog 2019-06-20.
2019-07-26 Enrico Schumann <[email protected]>
* R/valuation.R (valuation.position): warn when
there are missing values in multiplier, and add
an argument 'do.warn' to switch off the warning
* R/pricetable.R (pricetable.default): support
shortcuts for setting up a pricetable with a
single timestamp but several instruments. For
instance,
pricetable(c(A = 1, B = 2)) ## or
pricetable(1:2, instrument = c("A", "B"))
now create a pricetable.
* R/position.R (toHTML.position): add
method. Currently only works for positions at a
single point in time.
2019-07-03 Enrico Schumann <[email protected]>
* R/pl.R (pl.default, print.pl): new argument
'footnotes', with default TRUE. If FALSE, less
information is printed for 'pl' objects. In
particular, open positions no longer produce a
warning ("sum(amount) is not zero"), but only a
message, which is only shown when 'footnotes'
is TRUE.
2019-06-20 Enrico Schumann <[email protected]>
* R/btest.R (btest): [experimental]
'as.matrix' is no longer generally called on
'prices', but only if 'prices' are numeric
vectors. This allows alternative classes to
be used for 'prices', as long as they define
subsetting via integers/logicals in the same
way as numeric matrices.
2019-06-14 Enrico Schumann <[email protected]>
* R/returns.R (returns): returns will now be
computed for period "itd" even when no
timestamp is provided
2019-06-05 Enrico Schumann <[email protected]>
* R/btest.R (btest): when 'convert.weights' is
TRUE, only convert non-zero weights
2019-06-02 Enrico Schumann <[email protected]>
* DESCRIPTION (Version): 0.11-1
2019-05-22 Enrico Schumann <[email protected]>
* R/div_adjust.R (div_adjust): fix handling of
case additive = FALSE
2019-05-14 Enrico Schumann <[email protected]>
* R/btest.R (btest): clarify documentation of
burn-in 'b'
2019-04-30 Enrico Schumann <[email protected]>
* R/rebalance.R (rebalance): 'drop.zero' now
drops instruments for which 'current' and
'target' are the same, i.e. for which no
rebalancing is necessary (before, it would only
drop instruments for which both 'current' and
'target' are zero)
2019-04-03 Enrico Schumann <[email protected]>
* R/rebalance.R (rebalance): list instruments
for which prices are missing
2019-04-01 Enrico Schumann <[email protected]>
* DESCRIPTION (Version): 0.11-0
* R/position.R (print.position): fix condition (length
was > 1)
* R/plot_trading_hours.R (plot_trading_hours):
fix condition (length was > 1)
2019-03-28 Enrico Schumann <[email protected]>
* NAMESPACE: 'textutils::trim' is now longer
imported ('base::trimws' is used instead);
* DESCRIPTION (Depends, Suggests): move package
'crayon' to Suggests
2019-03-07 Enrico Schumann <[email protected]>
* R/valuation.R (valuation.position): fix
missing-prices warning
2019-02-24 Enrico Schumann <[email protected]>
* R/NAVseries.R (summary.NAVseries): rewrite
method and print method to support several
NAVseries, i.e. calling
summary(as.NAVseries(series1),
as.NAVseries(series2))
should print a summary that allows comparing
both series (though the print method is still
rudimentary)
2019-02-19 Enrico Schumann <[email protected]>
* R/NAVseries.R (NAVseries): new argument 'drop.NA'
(NAVseries): if 'NAV' inherits from 'btest',
call 'as.NAVseries.btest'
2019-02-15 Enrico Schumann <[email protected]>
* R/plot_trading_hours.R: fix axis tick
positions when 'label' == "days"
2019-02-14 Enrico Schumann <[email protected]>
* DESCRIPTION (Depends): revert to R >= 2.10
* R/internal.R (.isFALSE): add function, which
is used instead of 'isFALSE'. This is a
temporary workaround (temporary == a few years)
to allow the package to work with older R
versions
2019-02-13 Enrico Schumann <[email protected]>
* DESCRIPTION (Depends): R (>= 3.5), because of
'isFALSE'
2019-02-06 Enrico Schumann <[email protected]>
* R/valuation.R (valuation.position): warn
explicitly when no prices at all are available
for an instrument
2019-02-01 Enrico Schumann <[email protected]>
* inst/unitTests/ut_PMwR.R (test.returns.period):
add test for yearly returns
2019-01-29 Enrico Schumann <[email protected]>
* R/NAVseries.R (summary.NAVseries): method
gains argument 'bm' ("benchmark"). If set, a
'tracking.error' is computed.
2019-01-28 Enrico Schumann <[email protected]>
* R/NAVseries.R (as.NAVseries.btest): method
gains optional arguments 'instrument', 'title'
and 'description'
2019-01-23 Enrico Schumann <[email protected]>
* R/trades.R (scale_to_unity): remove
'scaleToUnity'. See ChangeLog 2017-06-23.
* R/NAVseries.R (summary.NAVseries): the
function now returns a list of lists
2019-01-22 Enrico Schumann <[email protected]>
* R/returns.R (toLatex.p_returns_monthly):
clean up code
* R/trades.R (scale_trades, split_trades):
remove 'scaleTrades', 'splitTrades'.
See ChangeLog 2017-06-23.
* R/valuation.R (valuation.journal): argument
'cashflow' may also be a numeric vector
2019-01-17 Enrico Schumann <[email protected]>
* R/journal.R (as.journal.list): add (bare-bones)
method
* R/position.R (position.default): add argument
'use.names'
2018-11-30 Enrico Schumann <[email protected]>
* R/trades.R (split_trades): when 'price' is
missing, NA is used
2018-11-22 Enrico Schumann <[email protected]>
* R/btest.R: when the journal is constructed,
make sure that class attributes are
preserved (notably for timestamp)
2018-11-13 Enrico Schumann <[email protected]>
* R/btest.R: make journal creation more memory
efficient, noticeable especially for backtests
with many (>100) assets
2018-11-09 Enrico Schumann <[email protected]>
* R/returns.R (returns,returns_rebalance):
'weights' may now also be a matrix with as many
rows as 'rebalance.when'. Also,
rebalancing at the first timestamp is no longer
implied, i.e. a function invocation such as
returns(x, weights = <...>,
rebalance.when = 2)
will only rebalance at the second timestamp,