c_log_difference_high_to_low#

c_log_difference_high_to_low(m_high, m_low)[source]

Calculate the logarithmic difference between unadjusted high and low prices.

Parameters:
Returns:

The logarithmic difference between high and low prices.

Return type:

DataColumn

Notes

Since log(high/low) = log(high) - log(low), log difference can be calculated as:

\[\mathrm{LogDiff} = \ln\left(\frac{\mathrm{High}}{\mathrm{Low}}\right)\]

In Excel, assuming high in column A and low in column B (starting at cell A2):

  1. In cell C2, enter:

    =LN(A2/B2)
    
  2. Drag the formula down to apply to subsequent rows.