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:
m_high (DataColumn) – The high prices.
m_low (DataColumn) – The low prices.
- Returns:
The logarithmic difference between high and low prices.
- Return type:
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):
In cell C2, enter:
=LN(A2/B2)
Drag the formula down to apply to subsequent rows.