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

DECIMAL(18,8)

9,999,999,999.99999999

Price

DECIMAL(18,8)

9,999,999,999.99999999

Commission

DECIMAL(10,4)

999,999.9999

Misc Fee

DECIMAL(10,4)

999,999.9999

SEC Fee

DECIMAL(8,4)

9,999.9999

TAF

DECIMAL(10,6)

9,999.999999

Exchange Fee

DECIMAL(14,8)

999,999.99999999

NSCC Fee

DECIMAL(8,4)

9,999.9999

Clearing Fee

DECIMAL(10,4)

999,999.9999

Realized P/L

DECIMAL(15,4)

99,999,999,999.9999

Unrealized P/L

DECIMAL(15,4)

99,999,999,999.9999

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

DECIMAL(15,4)

99,999,999,999.9999

Cash Balance

DECIMAL(15,4)

99,999,999,999.9999

Payout Amount

DECIMAL(10,4)

999,999.9999