Spreadsheet: 52881d1252690010-first-in-first-out-fifo-accounting-for-equity-trades-book-cost-fifo-test
Sheet: Sheet1

Investment | TradeQuantity | BaseUnitCost | BaseCost | UnitCostw/Comm
APC | 9030 | 54.127 | 488770.42 | 54.12739977851606 |  | 1236113.09
APC | 4515 | 54.992 | 248291.14 | 54.99250055370986 |  | 22575
APC | 4515 | 55.01 | 248370.15 | 55.01 |  | 54.75584008859358
APC | 4515 | 55.522 | 250681.38 | 55.52190033222591
APA | 13545 | 87.51 | 1185329.28
APA | 9030 | 87.956 | 794244.49
G24182100 | 27090 | 34.309 | 929426.29
CCK | 18060 | 24.496 | 442394.076
CCK | 4515 | 25.653 | 115822.39
CCK | 1806 | 25.659 | 46340.15
CCK | 903 | 25.653 | 23164.66
CCK | 1806 | 25.592 | 46218.24
CCK | 13545 | 25.83 | 349872.77
CCK | 22575 | 25.498 | 575608.32
DHR | 4515 | 60.473 | 273037.4
DHR | 4515 | 60.106 | 271377.68
DHR | 22575 | 62.065 | 1401112.86
DHR | 4515 | 62.707 | 283120.75
DHR | 18060 | 61.795 | 1116013.18
GE | 45150 | 13.401 | 605068.695
GE | 45150 | 13.845 | 625101.75
GE | 293475 | 13.793 | 4047845.5
GE | 22575 | 13.85 | 312663.75
GE | 135450 | 13.826 | 1872794.96
GE | 90300 | 13.862 | 1251783.75
HAL | 22575 | 23.712 | 535297.269
HAL | 58695 | 23.772 | 1395310.16
HAL | 9030 | 23.959 | 216349.77
ITW | 4515 | 41.76 | 188544.595
ITW | 4515 | 42.366 | 191284.3
ITW | 22575 | 41.995 | 948035.32
ITW | 4515 | 41.626 | 187940.49
ITW | 9030 | 43.493 | 392738.18
JEC | 4375 | 39.278 | 171842.195
JEC | 13605 | 39.479 | 537114.52
JEC | 9070 | 40.004 | 362836.28
JEC | 9070 | 40.711 | 369250.58
JEC | 4515 | 43.622 | 196954.23
JEC | 4515 | 43.667 | 197157.41
MDR | 9030 | 24.919 | 225019.475
MDR | 9030 | 25.323 | 228663.08
MDR | 4515 | 23.554 | 106346.31
NBR | 9030 | 18.32 | 165424.724
NBR | 13545 | 17.695 | 239676.07
NBR | 9030 | 17.531 | 158301.32
NBR | 13545 | 17.623 | 238704.89
NBR | 22575 | 17.291 | 390351.1
NBR | 22575 | 17.057 | 385068.55
NSC | 22575 | 45.898 | 1036151.87
NSC | 4515 | 48.35 | 218298.44
NSC | 4515 | 47.962 | 216550.24
SD | 75852 | 9.816 | 744539.26
SD | 13545 | 9.874 | 133747.84
SD | 903 | 11.82 | 10673.46
SD | 22575 | 11.318 | 255508.37
SD | 4515 | 12.303 | 55546.24
SLB | 4515 | 57.315 | 258778.58
SLB | 13545 | 55.98 | 758248.11
SLB | 9030 | 55.228 | 498707.94
SLB | 13545 | 55.322 | 749329.27
SLB | 4515 | 57.285 | 258641.78
SWN | 8127 | 37.996 | 308796.393
SWN | 14990 | 39.332 | 589588.48
SWN | 3973 | 39.466 | 156797.23
SWN | 9030 | 36.724 | 331615.91
SWN | 9030 | 36.938 | 333551.95
SWN | 9030 | 38.713 | 349575.68
SWN | 36120 | 38.878 | 1404271.12
STLD | 8929 | 16.533 | 147619.45
STLD | 22675 | 17.234 | 390780.45
STLD | 9030 | 17.403 | 157151.8
STLD | 9030 | 17.587 | 158808.8
STLD | 13545 | 17.519 | 237295.41
STLD | 18060 | 16.753 | 302557.37
STLD | 4515 | 16.034 | 72392.61
STLD | 36120 | 16.287 | 588272.89
STLD | 31605 | 16.275 | 514374.06
STLD | 27090 | 16.65 | 451035.85
STLD | 9030 | 16.054 | 144966.72
STLD | 22575 | 15.976 | 360646.91
STLD | 13545 | 16.028 | 217100.17
STLD | 22575 | 16.558 | 373790.89
STLD | 22575 | 17.118 | 386428.01
SFY | 4515 | 18.676 | 84321.238
SFY | 22575 | 17.902 | 404133.13
TEX | 7224 | 14.82 | 107059.68
TEX | 13545 | 14.882 | 201573.07
TEX | 22575 | 15.04 | 339528
TEX | 1084 | 16.569 | 17960.79
TEX | 16976 | 16.021 | 271965.71
TEX | 7224 | 16.607 | 119968.25
TEX | 3612 | 16.166 | 58392.5
TEX | 9030 | 15.555 | 140461.56
RIG | 9030 | 77.628 | 700976.027
RIG | 903 | 75.699 | 68356.19
RIG | 3612 | 75.108 | 271291
RIG | 4515 | 74.94 | 338355.91
RIG | 903 | 76.904 | 69444.31
RIG | 3612 | 79.458 | 287003.2
X | 7224 | 42.191 | 304786.821
X | 13545 | 42.401 | 574325.34
X | 9030 | 43.106 | 389245.37
X | 9030 | 43.449 | 392348.08
X | 27090 | 43.252 | 1171682.95
X | 1806 | 43.928 | 79333.96
UTX | 4515 | 52.945 | 239047.158
UTX | 4515 | 57.735 | 260673.52
UTX | 13545 | 58.717 | 795319.06
URS | 13545 | 42.162 | 571087.542
URS | 9030 | 43.577 | 393500.13
AKS | -58695 | 21.1 | -1238444.519 |  | 45150 | -13545
AKS | -9030 | 21.2 | -191440.1
AKS | -13545 | 20.56 | -278483.46
AKS | -9030 | 20.079 | -181313.22
AKS | -4515 | 19.611 | -88543.19
AKS | -4515 | 19.822 | -89494.02
AKS | -4515 | 20.234 | -91355.06
AKS | -4515 | 20.696 | -93440.03
AKS | -4515 | 21.061 | -95091.58
MT | -11739 | 35.741 | -419562.787
MT | -4515 | 35.765 | -161479.33
MT | -4515 | 34.757 | -156926.52
MT | -10836 | 37.218 | -403289.3
MT | -13545 | 37.388 | -506425.5
CAM | -9030 | 35.558 | -321092.406
CAM | -27090 | 35.094 | -950692.8
CAM | -9030 | 34.342 | -310103.89
CAM | -9030 | 36.442 | -329071.83
CP | -18060 | 49.056 | -885952.69
CP | -4515 | 47.475 | -214351.34
CP | -13545 | 46.817 | -634139.84
CP | -4515 | 48.672 | -219753.85
CP | -4515 | 49.378 | -222939.54
CP | -4515 | 48.216 | -217695.96
CAT | -19866 | 43.515 | -864477.759
CAT | -4515 | 44.665 | -201661.8
CAT | -9030 | 46.046 | -415795.53
CAT | -9030 | 46.738 | -422045.03
CAT | -2709 | 48.486 | -131347.9
CLF | -13545 | 27.781 | -376295.71
CLF | -22575 | 27.619 | -623491.93
CLF | -9030 | 28.398 | -256432.49
CLF | -22575 | 25.906 | -584828.71
CLF | -22575 | 26.231 | -592160.79
CLF | -27090 | 26.452 | -716588.83
COP | -4515 | 43.655 | -197102.946
COP | -9030 | 43.34 | -391357.36
COP | -9030 | 44.99 | -406258.28
COP | -13545 | 44.18 | -598413.55
COP | -9030 | 44.463 | -401496.89
COP | -4515 | 45.672 | -206208.29
DE | -36120 | 43.337 | -1565322.544
DE | -31605 | 42.841 | -1354002.84
DE | -67725 | 43.018 | -2913425.01
DVN | -4515 | 64.382 | -290683.125
DVN | -4515 | 62.251 | -281064.79
DVN | -4515 | 59.842 | -270186
DVN | -18060 | 61.777 | -1115693.74
DVN | -4515 | 61.178 | -276216.99
DVN | -9030 | 63.206 | -570749.15
DO | -18963 | 91.242 | -1730224.941
DO | -3612 | 89.929 | -324822.42
DO | -4515 | 88.749 | -400703.17
DO | -4515 | 87.52 | -395150.59
DO | -13545 | 90.588 | -1227019.94
DOV | -45150 | 33.174 | -1497782.363
EMR | -4515 | 35.053 | -158262.484
EMR | -9030 | 34.796 | -314209.28
EMR | -4515 | 35.833 | -161784.54
EMR | -18060 | 35.313 | -637757.15
EMR | -9030 | 36.054 | -325567.38
ECA | -9030 | 53.169 | -480113.65
ECA | -13545 | 53.336 | -722433.8
FLR | -6321 | 54.507 | -344537.12
FLR | -7224 | 54.432 | -393217.95
FLR | -903 | 55.689 | -50286.77
FLR | -7946 | 55.844 | -443736.92
FLR | -181 | 56.974 | -10312.39
FLR | -9030 | 55.797 | -503848.4
FLR | -4515 | 55.121 | -248873.04
FLR | -7224 | 53.991 | -390028.17
FLR | -1806 | 52.749 | -95264.96
FLR | -4515 | 53.125 | -239860.43
FTI | -22575 | 46.432 | -1048209.317
FTI | -9030 | 45.408 | -410036.34
FCX | -13545 | 63.81 | -864309.156
FCX | -4515 | 68.389 | -308776.52
FCX | -4515 | 67.611 | -305263.04
HLX | -22575 | 12.452 | -281094.39
HLX | -45150 | 12.474 | -563206.89
HLX | -4515 | 12.876 | -58133.64
HLX | -18060 | 13.334 | -240804.03
RRC | -18060 | 48.246 | -871314.28
RRC | -9030 | 49.108 | -443447.39
RRC | -9030 | 47.919 | -432708.28
RRC | -18060 | 49.014 | -885185.16
SII | -22575 | 27.431 | -619256.4
SII | -9030 | 25.713 | -232188.74
SII | -4515 | 27.027 | -122025.57
SII | -54180 | 26.99 | -1462305.91
SPY | -4515 | 103.742 | -468396.635