Skip to content

Configure stopout#

Overview#

In CopyFactory you can optionally configure stopout. If total drawdown (unrealized + realized) exceeds a configured threshold then the trades will be closed and further trading will be stopped until you manually clear the stopout.

By default CopyFactory will not apply a stopout. However, if you want to override this behaviour then you can specify an optional stopOutRisk setting. This setting can be specified on any of the following entities:

  • strategy
  • member of a portfolio strategy
  • portfolio strategy
  • subscription
  • account

This setting is additive. This means that CopyFactory will apply the setting to each of the contexts in which the setting is specified.

Clearing stopout#

In order to clear stopout you first need to update the context which triggered a stopout with startTime setting set to a current time. This means that drawdown will be calculated starting from this moment in time only. Then you need to invoke Reset stop outs API.

Example (strategy)#

{
  "name": "Strategy",
  ...
  "stopOutRisk": {
    "value": 0.3,
    "startTime": "2021-03-01T00:00:00.000Z"
  },
  ...
}

Example (member of a portfolio strategy)#

{
  "name": "Portfolio strategy",
  ...
  "members": [
    {
      ...
      "stopOutRisk": {
        "value": 0.3,
        "startTime": "2021-03-01T00:00:00.000Z"
      },
      ...
    },
    ...
  ],
  ...
}

Example (portfolio strategy)#

{
  "name": "Portfolio strategy",
  ...
  "stopOutRisk": {
    "value": 0.3,
    "startTime": "2021-03-01T00:00:00.000Z"
  },
  ...
}

Example (subscription)#

{
  "name": "Account",
  ...
  "subscriptions": [
    {
      ...
      "stopOutRisk": {
        "value": 0.3,
        "startTime": "2021-03-01T00:00:00.000Z"
      },
      ...
    },
    ...
  ],
  ...
}

Example (account)#

{
  "name": "Account",
  ...
  "stopOutRisk": {
    "value": 0.3,
    "startTime": "2021-03-01T00:00:00.000Z"
  },
  ...
}