Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MaxTargetVolumePercentが適用されるタイミングがなぜMainLimitCheckerで行われるなのか? #143

Open
winor30 opened this issue May 12, 2018 · 0 comments

Comments

@winor30
Copy link

winor30 commented May 12, 2018

お疲れ様です。
最近MaxTargetVolumePercentが使われているタイミングについて質問があります。
下記ログの通りMainLimitCheckerで取引数量が取引可能数量のMaxTargetVolumePercent%内であるかを判断して、オープンするかを判定していると思います。
ただ、個人的に思うのが、なぜ取引数量を決定するタイミングでこのMaxTargetVolumePercentを考慮しないのでしょうか?
下記ログの場合ですとAvailable volumeが0.03 btcであり、MaxTargetVolumePercentが20.0ならば、Target volumeOppotunitySearcherの部分で0.006 btcとするようにしたほうが、効率的に裁定できると思っています。

2018-05-10 17:04:59.708 INFO [OppotunitySearcher] Best ask : Bitbankcc Ask 1,015,900 0.659
2018-05-10 17:04:59.708 INFO [OppotunitySearcher] Best bid : Quoine Bid 1,019,100 0.03
2018-05-10 17:04:59.709 INFO [OppotunitySearcher] Spread : -3200
2018-05-10 17:04:59.709 INFO [OppotunitySearcher] Available volume : 0.03
2018-05-10 17:04:59.709 INFO [OppotunitySearcher] Target volume : 0.01
2018-05-10 17:04:59.709 INFO [OppotunitySearcher] Expected profit : 32 (0.314%)
2018-05-10 17:04:59.709 DEBUG [MainLimitChecker] MaxNetExposureLimit passed
2018-05-10 17:04:59.709 DEBUG [MainLimitChecker] InvertedSpreadLimit passed
2018-05-10 17:04:59.709 DEBUG [MainLimitChecker] MinTargetProfitLimit passed
2018-05-10 17:04:59.709 DEBUG [MainLimitChecker] MaxTargetProfitLimit passed
2018-05-10 17:04:59.709 DEBUG [MainLimitChecker] MaxTargetVolumeLimit violated

config.json

$ cat workspace/r2_all/r2/config.json
{
  "language": "en",
  "demoMode": false,
  "symbol": "BTC/JPY",
  "priceMergeSize": 1000,
  "maxSize": 0.01,
  "minSize": 0.001,
  "minTargetProfitPercent": 0.20,
  "exitNetProfitRatio": 80,
  "maxTargetVolumePercent": 10.0,
  "acceptablePriceRange": 0.1,
  "iterationInterval": 5000,
  "positionRefreshInterval": 5000,
  "sleepAfterSend": 5000,
  "maxNetExposure": 0.1,
  "maxRetryCount": 10,
  "orderStatusCheckInterval": 3000,
  "stabilityTracker": {
    "threshold": 7,
    "recoveryInterval": 120000
  },
  "onSingleLeg": {
    "action": "Reverse",
    "actionOnExit": "Proceed",
    "options": {
      "limitMovePercent": 10,
      "ttl": 10000
    }
  },
  "analytics": {
    "enabled": false,
    "plugin": "SimpleSpreadStatHandler.js",
    "initialHistory": { "minutes": 30 }
  },
  "brokers": [
    {
      "broker": "Coincheck",
      "enabled": false,
      "maxLongPosition": 0.15,
      "maxShortPosition": 0.15,
      "cashMarginType": "NetOut",
      "commissionPercent": 0
    },
    {
      "broker": "Bitflyer",
      "enabled": false,
      "maxLongPosition": 0.04,
      "maxShortPosition": 0,
      "cashMarginType": "Cash",
      "commissionPercent": 0,
      "noTradePeriods": [["04:00", "04:15"]]
    },
    {
      "broker": "Quoine",
      "enabled": true,
      "maxLongPosition": 0.04,
      "maxShortPosition": 0.04,
      "cashMarginType": "NetOut",
      "leverageLevel": 2,
      "commissionPercent": 0
    },
    {
      "broker": "Bitbankcc",
      "npmPath": "@bitr/bitbankcc",
      "enabled": true,
      "maxLongPosition": 0.03,
      "maxShortPosition": 0,
      "cashMarginType": "Cash",
      "commissionPercent": 0
    },
    {
      "broker": "Btcbox",
      "npmPath": "@bitr/btcbox",
      "enabled": true,
      "maxLongPosition": 0.04,
      "maxShortPosition": 0,
      "cashMarginType": "Cash",
      "commissionPercent": 0
    }
  ],
}
@winor30 winor30 changed the title MaxTargetVolumePercentが適用されるタイミングがなぜMainLimitCheckerなのか? MaxTargetVolumePercentが適用されるタイミングがなぜMainLimitCheckerで行われるなのか? May 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant