Mariner Backtesting -  service.info()

 service.info()

service. (method) Overview:

Record a message if the trading strategy is being run in info mode.

Otherwise, message is silently ignored.

Interface:
 info(message)

Sample - Calling Method

 service.info('hello world')
Parameters
Name Type Default Information
message string required Open field to record any data. Must be string
Returns:

None

Working Example:
from cloudquant.interfaces import Strategy


class InfoMessage(Strategy):


    @classmethod
    def on_strategy_start(cls, md, service, account):

        # define a symbol list
        cls.symbol_list = ['AAPL', 'AMZN', 'FB', 'GOOGL', 'SBUX', 'SPY']
        # write a string message for the length of the symbol list
        message = 'There are ' + str(len(cls.symbol_list)) + ' symbols in your symbol universe.'
        # service.info will send the message to the info tab under log
        service.info(message)


    @classmethod
    def is_symbol_qualified(cls, symbol, md, service, account):
        # qualifies all symbols in cls.symbol_list
        return symbol in cls.symbol_list

Info Tab

Alerts under Log