blotter provides transaction infrastructure for defining transactions, portfolios and accounts for trading systems and simulation. Provides portfolio support for multi-asset class and multi-currency portfolios. Actively maintained and developed.
112
stars
49
forks
source link
txnsim - When setting 'maxlongpos' and 'maxshortpos' we need to make sure it exists #64
Inside txnstruct() we currently use !is.null(maxlongpos) and !is.null(maxshortpos) to check whether maxlongpos or maxshortpos exists. When one of these variables does not exist, the function will error out as the argument is missing.
Inside txnstruct() we currently use !is.null(maxlongpos) and !is.null(maxshortpos) to check whether maxlongpos or maxshortpos exists. When one of these variables does not exist, the function will error out as the argument is missing.
Instead using try() would work.
Note joran's reply to this SO question. Note also @gsee reply.