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 gym | |
from gym.envs.registration import register | |
from gym import error, spaces, utils | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import pandas as pd | |
import pandas_datareader.data as web | |
import arrow | |
import random | |
import sys |
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 pandas as pd | |
import pandas_datareader.data as web | |
import numpy as np | |
class Metrics(): | |
def __init__(self, returns, risk_free_rate=2, period='daily'): | |
self.returns = returns | |
self.period = { | |
'monthly' : 12, | |
'weekly' : 52, |