Precision of Calculations
Rounding in Reports
Many reports will show rounded values in order to make them easier to read. This means that the sum of individual values in the report as displayed may not add up to the totals. Internally, the accuracy of calculations is much greater.
To see the exact value of a particular field, you can export the report to Excel and examine the cell value in the formula bar (or edit the cell formatting parameters):
While computing fees and balances, PropReports attempts to be as accurate as possible. However, finite storage constraints and the nature of floating point math arithmetic impose a limitation on the precision of final results.
In-Memory Calculations
PropReports uses the BCMath arbitrary precision library set to the scale of 8 decimal places (0.00000001
). The library does not round the final result but rather cuts it off at 8 digits (this is how most of these libraries work). For example, 0.000000015
becomes 0.00000001
and -0.000000015
becomes -0.00000001
.
Database Storage
After the values are computed they are stored with varying degrees of precision:
Fills and positions (per symbol, account and day):
Value | Data Type | Largest Value |
---|---|---|
Quantity |
|
|
Price |
|
|
Commission |
|
|
Misc Fee |
|
|
SEC Fee |
|
|
TAF |
|
|
Exchange Fee |
|
|
NSCC Fee |
|
|
Clearing Fee |
|
|
Realized P/L |
|
|
Unrealized P/L |
|
|
For example, for account XYZ
, total commission for a specific day may not exceed 999,999.9999
. If it does, 999,999.9999
will be stored. The commission cannot be less than 0.0001
(0.0000
will be stored).
Adjustments (per adjustment), Cash Balance (per account and day), and Payouts (per rep per day):
Value | Data Type | Largest Value |
---|---|---|
Adjustment Amount |
|
|
Cash Balance |
|
|
Payout Amount |
|
|