Skip to content

Instantly share code, notes, and snippets.

View jmcph4's full-sized avatar

Jack McPherson jmcph4

View GitHub Profile
module Book where
import Control.Applicative (liftA2)
maximumMaybe :: Ord a => [a] -> Maybe a
maximumMaybe [] = Nothing
maximumMaybe xs = Just (maximum xs)
minimumMaybe :: Ord a => [a] -> Maybe a
minimumMaybe [] = Nothing

Why the USD nominal can diverge sharply from the AUD nominal

When --risk-free us is used, perf.py converts the portfolio's AUD cashflows to USD via daily AUD/USD spot (Yahoo AUDUSD=X) before applying the US Treasury deflator. The reported USD nominal is the XIRR of those FX-converted cashflows.

The USD nominal can look surprisingly high (or low) compared to the AUD nominal whenever AUD has moved materially against USD over the holding period. This is not a bug — it is the real USD return an offshore

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.