Skip to content

Instantly share code, notes, and snippets.

View keobox's full-sized avatar

cesare placanica keobox

View GitHub Profile
@StuartGordonReid
StuartGordonReid / RiskAdjustedReturnMetrics.py
Last active June 13, 2023 06:40
Measured of Risk-adjusted Return
import math
import numpy
import numpy.random as nrand
"""
Note - for some of the metrics the absolute value is returns. This is because if the risk (loss) is higher we want to
discount the expected excess return from the portfolio by a higher amount. Therefore risk should be positive.
"""