Set up DB Parameters

THIS STEP IS OPTIONAL: Only required when you are using Orca as a package. Within SharkSigma, the user inputs can be selected from the frontend interface directly.
In order to run Orca, we need to have some user inputs and set up DB parameters (such as db_name, time period, and time interval) to successfully run with those inputs.
To set up DB parameters, create a python dictionary i.e, key-value pair; having the following keys:
  • instrument list: contains various instruments in python list
  • table name: DB table name for India/US.
    1. 1.
      For India, 'india_eod': EOD, 'india_5m': 5-minute intraday, 'india_1m': 1-minute intraday.
    2. 2.
      For the US, 'sp500_eod': EOD, 'sp500_5m': 5-minute intraday, 'sp500_1m': 1-minute intraday.
  • start and end date: specifies the time period in MM-DD-YYYY format.
  • time interval: Day level (1D), Week level (1W), intraday (1min, 5min, 15min, 30min, 1H, 4H)
Now, let's look at the code:
user_input_dict = {
'instrument_list': ['RELIANCE'],
'table_name': 'india_eod',
'start_date': "01-01-2019",
'end_date': "01-28-2020",
'interval': '4H',
'initial_capital': 100000,
'market_hours': 1,
'data_input_type': 'db',
'user_file_name': 'strategy_name',
'root_file_path': os.path.splitext(__file__)[0], # Current File Path
'path_type': 'AWS'