def __init__(self): # Create some assets: assetsList = [Asset('WS30', 'traditional', 'historical'), # Index US Asset('XAUUSD', 'traditional', 'historical'), # Commodity Asset('GDAXIm', 'traditional', 'historical'), # Index EUR Asset('EURUSD', 'traditional', 'historical'), # Major Asset('GBPJPY', 'traditional', 'historical') # Minor ] # Initialize the ResearchStudy class: super().__init__('MarkovAutoRegressiveModels', assetsList)
def __init__(self): # Create some assets: assetsList = [ Asset('WS30', 'traditional', 'historical'), # Index US Asset('XAUUSD', 'traditional', 'historical'), # CryptoCurrency Asset('GDAXIm', 'traditional', 'historical'), # Index EUR Asset('EURUSD', 'traditional', 'historical'), # Major Asset('GBPJPY', 'traditional', 'historical') ] # Minor # Initialize the ResearchStudy class: super().__init__('HiddenMarkovModel', assetsList)
def __init__(self): # Create some assets: assetsList = [ Asset('PLF_4.1', 'darwin', 'historical'), Asset('LVS_4.20', 'darwin', 'historical'), Asset('SYO_4.24', 'darwin', 'historical') ] self.R_STUDY = ResearchStudy(assetsList, formOrRead='read_darwin', formerOrNew='former') self.R_STUDY._generateResampledAndFilteredSeries(resampleRule='1D')
def __init__(self): # Create some assets: assetsList = [ Asset('WS30', 'traditional', 'historical'), # Index US Asset('XAUUSD', 'traditional', 'historical'), # CryptoCurrency Asset('GDAXIm', 'traditional', 'historical'), # Index EUR Asset('EURUSD', 'traditional', 'historical'), # Major Asset('GBPJPY', 'traditional', 'historical') ] # Minor # Create the RSTUDY object: self.R_STUDY = ResearchStudy(assetsList, formOrRead='read_features')
def __init__(self): # Create some assets: assetsList = [ Asset('WS30', 'traditional', 'historical'), # Index US Asset('XAUUSD', 'traditional', 'historical'), # CryptoCurrency Asset('GDAXIm', 'traditional', 'historical'), # Index EUR Asset('EURUSD', 'traditional', 'historical'), # Major Asset('GBPJPY', 'traditional', 'historical') ] # Minor # Create the RSTUDY object: self.R_STUDY = ResearchStudy(assetsList, formOrRead='read_features') # Print to see if working: print(self.R_STUDY.PORTFOLIO._portfolioDict['WS30'])
def __init__(self): # Create some assets: assetsList = [ Asset('WS30', 'traditional', 'historical'), # Index US Asset('XAUUSD', 'traditional', 'historical'), # Commodity Asset('GDAXIm', 'traditional', 'historical'), # Index EUR Asset('EURUSD', 'traditional', 'historical'), # Major Asset('GBPJPY', 'traditional', 'historical') ] # Minor # Initialize the ResearchStudy class: super().__init__('HiddenMarkovModel', assetsList) # Make a random seed to reproduce results: np.random.seed(33)
def __init__(self): # Create some assets: assetsList = [Asset('WS30', 'traditional', 'historical'), # Index US Asset('XAUUSD', 'traditional', 'historical'), # Commodity Asset('GDAXIm', 'traditional', 'historical'), # Index EUR Asset('EURUSD', 'traditional', 'historical'), # Major Asset('GBPJPY', 'traditional', 'historical')] # Minor # Initialize the ResearchStudy class: super().__init__('KalmanFilterCloseModel', assetsList) # Make a random seed to reproduce results: np.random.seed(33) # Print to see if working: logger.warning(self.PORTFOLIO._portfolioDict['WS30'])
### First, we append the previous level to the sys.path var: import sys, os ### We append the repository path to the sys.path so that we can import packages easily. sys.path.append(os.path.expandvars('${HOME}/Desktop/quant-research-env/')) # Import the class: from RegimeAnalysisContentSeries.Python_Classes.AssetClass import Asset from RegimeAnalysisContentSeries.Python_Classes.ResearchStudyClass import ResearchStudy import os, pprint # Create some assets: assetsList = [ Asset('PLF_4.1', 'darwin', 'historical'), Asset('LVS_4.20', 'darwin', 'historical'), Asset('SYO_4.24', 'darwin', 'historical') ] # Create some path variables > Point them to the specific folder: homeStr = os.path.expanduser("~") plotsSaveDirectory = os.path.expandvars( f'{homeStr}/Desktop/quant-research-env/DARWINStrategyContentSeries/Data') dataframesSaveDirectory = os.path.expandvars( f'{homeStr}/Desktop/quant-research-env/DARWINStrategyContentSeries/Data') #R_STUDY = ResearchStudy(assetsList, formOrRead='form_darwin', saveTheData=True) R_STUDY = ResearchStudy(assetsList, formOrRead='read_darwin', formerOrNew='former') # Apply the reseach study we want: R_STUDY._generateDARWINTickBars(threshold=5000)
from RegimeAnalysisContentSeries.Python_Classes.ResearchStudyClass import ResearchStudy from RegimeAnalysisContentSeries.Python_Classes.AssetClass import Asset import os # Create some path variables > Point them to the specific folder: homeStr = os.path.expanduser("~") plotsSaveDirectory = os.path.expandvars( f'{homeStr}/Desktop/quant-research-env/RegimeAnalysisContentSeries/Plots/Plots_Others' ) dataframesSaveDirectory = os.path.expandvars( f'{homeStr}/Desktop/quant-research-env/RegimeAnalysisContentSeries/Data/Data_Others' ) # Create some assets: assetsList = [ Asset('WS30', 'traditional', 'historical'), # Index US Asset('XAUUSD', 'traditional', 'historical'), # CryptoCurrency Asset('GDAXIm', 'traditional', 'historical'), # Index EUR Asset('EURUSD', 'traditional', 'historical'), # Major Asset('GBPJPY', 'traditional', 'historical') ] # Minor # Read it from file: # NOTE: If the data is not in the /Data directory> # we will need to change the path in the AssetClass _readBidAndAskHistoricalData method. R_STUDY = ResearchStudy(assetsList, formOrRead='read', dateHourString='2020-02-04_23') # Apply the reseach study we want: R_STUDY._generateTickBars(endDate='2020-02-04_23', threshold=1522)