Hello
Have been trying to do back testing on various stocks over a period of 30 days and upto 180 days.
Most work fine for 30 day back testing, but a high percentage of them are failing when I backtest 180 days.
Here is what I get in the log. Please advise how to resolve:
[2022-01-03 22:15:19] Performing sanity checks on cfg strategy_parameters, setting up required data structures…
[2022-01-03 22:15:23] Sanity checks on cfg successful.
[2022-01-03 22:15:23] Currency set to “INR”
[2022-01-03 22:15:23] Setting up broker connection…
[2022-01-03 22:15:24] Broker connection has been setup successfully.
[2022-01-03 22:15:24] (NSE_EQ) Funds available in client’s ABVIRTUALBROKER account is : INR ‘1000000000.00’
[2022-01-03 22:15:24]
########################################
INITIALIZING ALGOBULLS CORE (v3.3.0 SECURE MODE)…
########################################
[2022-01-03 22:15:24] Welcome ALGOBULLS VIRTUAL USER!
[2022-01-03 22:15:24] Reading strategy…
[2022-01-03 22:15:24] Entering Backtesting mode. Henceforth, all timestamps will be Backtesting timestamps…
[BT] [2021-06-01 09:15:00,000] [INFO] [tls] STARTING ALGOBULLS CORE…
[BT] [2021-06-01 09:15:00,000] [INFO] [tls]
####### # ###### ####### ### # #
# # # # # # # # ## # #
# # # # # # # # # #
# # # ###### # # # # # #
# # ####### # # # # # # # # #
# # # # # # # # # ## #
# # # # # # ### # #
# # ##### ####### ###### # # # # #####
# # # # # # # # # # # # #
# # # # # # # # # # #
# # # #### # # ###### # # # #
####### # # # # # # # # # # # #
# # # # # # # # # # # # #
# ####### ##### ####### ###### ##### ####### #######
####### ######
# # # # #
# # # #
# # ######
# # # #
# # # # #
####### # #
[BT] [2021-06-01 09:15:00,000] [INFO] [tls] --------------------Master Cfg Parameters:--------------------
[BT] [2021-06-01 09:15:00,000] [INFO] [tls] User: ALGOBULLS VIRTUAL USER
[BT] [2021-06-01 09:15:00,000] [INFO] [tls] Broker: ABVIRTUALBROKER
[BT] [2021-06-01 09:15:00,000] [INFO] [tls] AUTO_ADD_INSTRUMENTS_BUCKET_FROM_POSITIONS: False
[BT] [2021-06-01 09:15:00,000] [INFO] [tls] AUTO_ADD_INSTRUMENTS_BUCKET_FROM_HOLDINGS_TPLUS1: False
[BT] [2021-06-01 09:15:00,000] [INFO] [tls] AUTO_ADD_INSTRUMENTS_BUCKET_FROM_HOLDINGS_TPLUS2: False
[BT] [2021-06-01 09:15:00,000] [INFO] [tls] RESUME_POSITIONS_ON_START: False
[BT] [2021-06-01 09:15:00,000] [INFO] [tls] RESUME_HOLDINGS_TPLUS1_ON_START: False
[BT] [2021-06-01 09:15:00,000] [INFO] [tls] RESUME_HOLDINGS_TPLUS2_ON_START: False
[BT] [2021-06-01 09:15:00,000] [INFO] [tls] EXIT_INTRADAY_ORDERS_ON_STOP: True
[BT] [2021-06-01 09:15:00,000] [INFO] [tls] EXIT_TPLUS0_DELIVERY_ORDERS_ON_STOP: False
[BT] [2021-06-01 09:15:00,000] [INFO] [tls] EXIT_TPLUS1_DELIVERY_ORDERS_ON_STOP: False
[BT] [2021-06-01 09:15:00,000] [INFO] [tls] EXIT_TPLUS2_DELIVERY_ORDERS_ON_STOP: False
[BT] [2021-06-01 09:15:00,000] [INFO] [tls] --------------------User Cfg Parameters: System Parameters--------------------
[BT] [2021-06-01 09:15:00,000] [INFO] [tls] Trading type: BACKTESTING
[BT] [2021-06-01 09:15:00,000] [INFO] [tls] User trading start time: 2021-06-01 09:15:00+05:30
[BT] [2021-06-01 09:15:00,000] [INFO] [tls] User trading end time: 2021-12-31 15:15:00+05:30
[BT] [2021-06-01 09:15:00,000] [INFO] [tls] --------------------User Cfg Parameters: Funds Parameters--------------------
[BT] [2021-06-01 09:15:00,000] [INFO] [tls] Credit Exposure: 1
[BT] [2021-06-01 09:15:00,000] [INFO] [tls] Fund Allocator: FundAllocatorLots
[BT] [2021-06-01 09:15:00,000] [INFO] [tls] Fund Allocator Parameters: {‘NUMBER_OF_LOTS’: 400}
[BT] [2021-06-01 09:15:00,000] [INFO] [tls] --------------------User Cfg Parameters: Candle Parameters--------------------
[BT] [2021-06-01 09:15:00,000] [INFO] [tls] Candle interval (sec): 900
[BT] [2021-06-01 09:15:00,000] [INFO] [tls] --------------------User Cfg Parameters: Strategy Parameters--------------------
[BT] [2021-06-01 09:15:00,000] [INFO] [tls] Strategy: Two Green Red Candle Price EMA Regular
[BT] [2021-06-01 09:15:00,000] [INFO] [tls] Parameters: {‘EMA_PERIOD’: 12.0, ‘PROFIT_BOOKING_PERCENTAGE_BUY’: 2.5, ‘PROFIT_BOOKING_PERCENTAGE_SELL’: 1.0}
[BT] [2021-06-01 09:15:00,000] [INFO] [tls] Strategy Mode: INTRADAY
[BT] [2021-06-01 09:15:00,000] [INFO] [tls] Instruments Bucket: instruments_bucket | [NSE_EQ:CHOLAFIN]
[BT] [2021-06-01 09:15:00,000] [INFO] [tls] --------------------User Cfg Parameters: Risk Management Parameters--------------------
[BT] [2021-06-01 09:15:00,000] [INFO] [tls] Target Trigger: None
[BT] [2021-06-01 09:15:00,000] [INFO] [tls] Stoploss Trigger: None
[BT] [2021-06-01 09:15:00,000] [INFO] [tls] Trailing Stoploss Trigger: None
[BT] [2021-06-01 09:15:00,000] [INFO] [tls] Desired profit: None
[BT] [2021-06-01 09:15:00,000] [INFO] [tls] Risk Appetite: None
[BT] [2021-06-01 09:15:00,000] [INFO] [tls] PNL scan frequency (in sec): 30
[BT] [2021-06-01 09:15:00,000] [INFO] [tls] --------------------User Cfg Parameters: Other Parameters--------------------
[BT] [2021-06-01 09:15:00,000] [INFO] [tls] Allow multiple orders for same script: True
[BT] [2021-06-01 09:15:00,000] [INFO] [tls] Allow new order when order for script already running: True
[BT] [2021-06-01 09:15:00,000] [INFO] [tls] Instrument max orders count: 100
[BT] [2021-06-01 09:15:00,000] [INFO] [tls] Remove Instrument if Order Rejected: False
[BT] [2021-06-01 09:15:00,000] [INFO] [tls] Crossover accuracy decimals: 2
[BT] [2021-06-01 09:15:00,000] [INFO] [tls] ------------------------------------------------------------
[BT] [2021-06-01 09:15:00,000] [INFO] [utils] Instrument (NSE_EQ:CHOLAFIN) subscribed to historical data successfully
[BT] [2021-06-01 09:15:00,000] [INFO] [utils] 1 Instruments subscribed to historical data successfully
[BT] [2021-06-01 09:15:00,000] [INFO] [utils] Prefetching historical data for 1 instruments…
[BT] [2021-06-01 09:15:00,000] [INFO] [strategy]
####################
Strategy Parameters:
StrategyParameters([(‘EMA_PERIOD’, 12),
(‘PROFIT_BOOKING_PERCENTAGE_BUY’, 2.5),
(‘PROFIT_BOOKING_PERCENTAGE_SELL’, 1)])
####################
[BT] [2021-06-01 09:15:00,000] [INFO] [tls] Not launching PNL tracker…
[BT] [2021-06-01 09:15:00,000] [INFO] [tls] Received event EXCEPTION. Stopping AlgoBulls Trading Core Engine…
[BT] [2021-06-01 09:15:00,000] [INFO] [tls] Cancelling all open orders (if any)… Starting
[BT] [2021-06-01 09:15:00,000] [INFO] [tls] Cancelling all open orders (if any)… Done
[BT] [2021-06-01 09:15:00,000] [INFO] [tls] Exiting all open positions…
[BT] [2021-06-01 09:15:00,000] [INFO] [tls] Exiting all open positions with order code: ORDER_CODE_INTRADAY (if any)…
[BT] [2021-06-01 09:15:00,000] [INFO] [tls] Exiting all open positions with order code: ORDER_CODE_DELIVERY_T0 (if any)…
[BT] [2021-06-01 09:15:00,000] [INFO] [tls] Exiting all open positions with order code: ORDER_CODE_DELIVERY_T1 (if any)…
[BT] [2021-06-01 09:15:00,000] [INFO] [tls] Exiting all open positions with order code: ORDER_CODE_DELIVERY_T2 (if any)…
[BT] [2021-06-01 09:15:00,000] [INFO] [tls] [User: ALGOBULLS VIRTUAL USER] Trading session completed
[BT] [2021-06-01 09:15:00,000] [INFO] [oms]
PENDING ORDERS:
COMPLETED ORDERS:
POSITIONS:
HOLDINGS:
[BT] [2021-06-01 09:15:00,000] [CRITICAL] [tls] An error has occurred due to which the strategy execution cannot proceed anymore. Reason: inputs are all NaN.
If the reason doesn’t help, please double check the tweak parameters. If everything seems fine, please checkout https://community.algobulls.com or contact support@algobulls.com for support.