This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | |
""" | |