""" # Loading data import datetime import pandas from chartpy import Chart, Style from finmarketpy.economics import Seasonality from findatapy.market import Market, MarketDataGenerator, MarketDataRequest from chartpy.style import Style from findatapy.timeseries import Calculations from findatapy.util.loggermanager import LoggerManager seasonality = Seasonality() calc = Calculations() logger = LoggerManager().getLogger(__name__) chart = Chart(engine='matplotlib') market = Market(market_data_generator=MarketDataGenerator()) # choose run_example = 0 for everything # run_example = 1 - seasonality of gold # run_example = 2 - seasonality of FX vol # run_example = 3 - seasonality of gasoline # run_example = 4 - seasonality in NFP # run_example = 5 - seasonal adjustment in NFP run_example = 0
# loading data import datetime import pandas from chartpy import Chart, Style from finmarketpy.economics import Seasonality from findatapy.market import Market, MarketDataGenerator, MarketDataRequest from chartpy.style import Style from findatapy.timeseries import Calculations from findatapy.util.loggermanager import LoggerManager seasonality = Seasonality() calc = Calculations() logger = LoggerManager().getLogger(__name__) chart = Chart(engine='matplotlib') market = Market(market_data_generator=MarketDataGenerator()) # choose run_example = 0 for everything # run_example = 1 - seasonality of gold # run_example = 2 - seasonality of FX vol # run_example = 3 - seasonality of gasoline # run_example = 4 - seasonality in NFP # run_example = 5 - seasonal adjustment in NFP run_example = 0
__author__ = 'saeedamen' # loading data import datetime from chartpy import Chart, Style from finmarketpy.economics import Seasonality from findatapy.market import Market, MarketDataGenerator, MarketDataRequest from chartpy.style import Style from findatapy.timeseries import Calculations from findatapy.util.loggermanager import LoggerManager seasonality = Seasonality() calc = Calculations() logger = LoggerManager().getLogger(__name__) chart = Chart(engine='matplotlib') market = Market(market_data_generator=MarketDataGenerator()) # choose run_example = 0 for everything # run_example = 1 - seasonality of gold # run_example = 2 - seasonality of FX vol # run_example = 3 - seasonality of gasoline # run_example = 4 - seasonality in NFP run_example = 0 ###### calculate seasonal moves in Gold (using Bloomberg data)
from chartpy import Chart, Style from finmarketpy.economics import Seasonality from findatapy.market import Market, MarketDataGenerator, MarketDataRequest from chartpy.style import Style from findatapy.timeseries import Calculations from findatapy.util.loggermanager import LoggerManager seasonality = Seasonality() calc = Calculations() logger = LoggerManager().getLogger(__name__) chart = Chart(engine='matplotlib') market = Market(market_data_generator=MarketDataGenerator()) """Only to test if market fetcher is working Add other data sources to try API akeys and libraries """ md_request = MarketDataRequest( start_date="20 Nov 2016", # start date freq='daily', data_source='bloomberg', # use Bloomberg as data source tickers=['Gold'], fields=['close'], # which fields to download vendor_tickers=['XAUUSD Curncy'], # ticker (Bloomberg) vendor_fields=['PX_LAST'], # which Bloomberg fields to download cache_algo='internet_load_return') # how to return data df = market.fetch_market(md_request) print(df)
__author__ = 'saeedamen' # loading data import datetime from chartpy import Chart, Style from finmarketpy.economics import Seasonality from findatapy.market import Market, MarketDataGenerator, MarketDataRequest from chartpy.style import Style from findatapy.timeseries import Calculations from findatapy.util.loggermanager import LoggerManager seasonality = Seasonality() calc = Calculations() logger = LoggerManager().getLogger(__name__) chart = Chart(engine='matplotlib') market = Market(market_data_generator=MarketDataGenerator()) # choose run_example = 0 for everything # run_example = 1 - seasonality of gold # run_example = 2 - seasonality of FX vol # run_example = 3 - seasonality of gasoline # run_example = 4 - seasonality in NFP run_example = 0 ###### calculate seasonal moves in Gold (using Bloomberg data) if run_example == 1 or run_example == 0:
__author__ = 'saeedamen' # loading data import datetime from chartpy import Chart, Style from finmarketpy.economics import Seasonality from findatapy.market import Market, MarketDataGenerator, MarketDataRequest from chartpy.style import Style from findatapy.timeseries import Calculations from findatapy.util.loggermanager import LoggerManager seasonality = Seasonality() calc = Calculations() logger = LoggerManager().getLogger(__name__) chart = Chart(engine='matplotlib') market = Market(market_data_generator=MarketDataGenerator()) # choose run_example = 0 for everything # run_example = 1 - seasonality of gold # run_example = 2 - seasonality of FX vol run_example = 0 ###### calculate seasonal moves in Gold (using Bloomberg data) if run_example == 1 or run_example == 0: md_request = MarketDataRequest( start_date="01 Jan 1996", # start date