summaryrefslogtreecommitdiff
path: root/test/baseline/opt-gain.test
blob: 8188976c28400be24b1c9c3444a625caaef95a64 (plain)
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
2009/01/01 Sample 1a
    Assets:Brokerage:Stocks                100 S
    Assets:Brokerage:Cash                 -100 P

P 2009/01/15 00:00:00 S 2 P

2009/02/01 Sample 2a
    Assets:Brokerage:Stocks                100 S @ 1 P
    Assets:Brokerage:Cash

P 2009/02/01 00:00:00 S 4 P

2009/03/01 Sample 3a
    Assets:Brokerage:Stocks                100 S @@ 100 P
    Assets:Brokerage:Cash

P 2009/03/01 00:00:00 S 8 P

2009/04/01 Sample 4a
    Assets:Brokerage:Cash                  100 P
    Assets:Brokerage:Stocks               -100 S {1 P}

P 2009/04/01 00:00:00 S 16 P

; In this usage case, the top amount is always secondary
; 2010/01/01 Sample 1b
;     Assets:Brokerage:Cash               -100 P
;     Assets:Brokerage:Stocks              100 S
;
; P 2010/01/01 00:00:00 S 2 P

2010/02/01 Sample 2b
    Assets:Brokerage:Cash
    Assets:Brokerage:Stocks                100 S @ 1 P

P 2010/02/01 00:00:00 S 4 P

2010/03/01 Sample 3b
    Assets:Brokerage:Cash
    Assets:Brokerage:Stocks                100 S @@ 100 P

P 2010/03/01 00:00:00 S 8 P

2010/04/01 Sample 4b
    Assets:Brokerage:Stocks               -100 S {1 P}
    Assets:Brokerage:Cash                  100 P

P 2010/04/01 00:00:00 S 16 P

test reg --gain stocks
09-Jan-15 Commodities revalued  <Revalued>                    100 P        100 P
09-Feb-01 Commodities revalued  <Revalued>                    200 P        300 P
09-Feb-01 Sample 2a             Asset:Brokerage:Stocks        300 P        600 P
09-Mar-01 Commodities revalued  <Revalued>                    800 P       1400 P
09-Mar-01 Sample 3a             Asset:Brokerage:Stocks        700 P       2100 P
09-Apr-01 Commodities revalued  <Revalued>                   2400 P       4500 P
09-Apr-01 Sample 4a             Asset:Brokerage:Stocks      -1500 P       3000 P
10-Feb-01 Commodities revalued  <Revalued>                  -2400 P        600 P
10-Feb-01 Sample 2b             Asset:Brokerage:Stocks        300 P        900 P
10-Mar-01 Commodities revalued  <Revalued>                   1200 P       2100 P
10-Mar-01 Sample 3b             Asset:Brokerage:Stocks        700 P       2800 P
10-Apr-01 Commodities revalued  <Revalued>                   3200 P       6000 P
10-Apr-01 Sample 4b             Asset:Brokerage:Stocks      -1500 P       4500 P
end test

test bal --change
              4500 P  Assets:Brokerage:Stocks
end test

test bal -G
              4500 P  Assets:Brokerage:Stocks
end test