Orca
  • Introduction
  • Getting Started
    • Quick Reference Guide
    • Strategy Skeleton
  • Writing Strategies
    • 01. Buy and Hold Strategy
    • 02. Long and Short Strategies
    • 03. Add Technical Indicators
    • 04. Add Targets and Stops
    • 05. Multi-Timeframe Strategy
    • Set up DB Parameters
  • Error Handling
  • Debugging in Orca
Powered by GitBook
On this page

Was this helpful?

  1. Writing Strategies

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.

Previous05. Multi-Timeframe StrategyNextDebugging in Orca

Last updated 3 years ago

Was this helpful?

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 i.e, key-value pair; having the following keys:

  • instrument list: contains various instruments in

  • table name: DB table name for India/US.

    1. For India, 'india_eod': , 'india_5m': 5-minute , 'india_1m': 1-minute intraday.

    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: (1D), (1W), (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'
}

python dictionary
python list
EOD
intraday
Day level
Week level
intraday