Skip to content

Commit

Permalink
Merge branch 'release/1.8.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
benmarten committed Jan 22, 2018
2 parents d5ab3e7 + 05352c4 commit 98af08b
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 6 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
<a name="1.8.0"></a>
# [1.8.0](https://github.com/benmarten/CryptoETF/compare/1.7.0...1.8.0) (2018-01-22)


### Features

* **strategy:** allow for manual allocation recommendation ([#41](https://github.com/benmarten/CryptoETF/issues/41)) ([f47a63f](https://github.com/benmarten/CryptoETF/commit/f47a63f))



<a name="1.7.0"></a>
# [1.7.0](https://github.com/benmarten/CryptoETF/compare/1.6.2...1.7.0) (2018-01-22)

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ The tool expects your settings in settings.json. Take a look at settings.example
- *accounts*: Under accounts, fill in your api credentials for the exchange that you want to use. Delete the exchanges that you do not need.
- *symbolMapping*: Some exchanges use different symbols that coinmarketcap.com. Hence here you can map the symbols, e.g.: map MIOTA to IOTA.
- *otherHoldings*: A place to manually add some of your holdings. Notation is key: Symbol, value is amount of native currency.
- *allocations*: Here you can manually define allocations of coins. The allocations is calculated from the amount of points it gets relative to the total amount of points. Filling in `66.67` and `33.33` for two currencies will yield the same result as `6` and `3` for example. If allocations is not mentioned in settings.json the allocations will reflect the coin's market cap relative to the other coins in the portfolio.
- *options*: These are specific options for the tool:
- targetValueUsd: The target value for your ETF; A general rule of thumb is to keep your crypto at a certain percentage of your overall investment portfolio. This could be 5, 10, 20 or more percent, depending on your risk tolerance.
- Default [false]: Use current portfolio value as target value.
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
"testLocal": "./node_modules/.bin/nyc mocha --require babel-core/register test/**/*.js test/**/**/*.js",
"test": "NODE_ENV=test npm run testLocal"
},
"version": "1.7.0"
"version": "1.8.0"
}
11 changes: 9 additions & 2 deletions settings.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,26 @@
}]
},
"symbolNameMapping": {
"Bitgem": "BITG"
"Remicoin": "REMI",
"KingN Coin": "KINGN",
"ENTCash": "ENTCASH"
},
"symbolMapping": {
"USD": "USDT",
"STR": "XLM",
"IOTA": "MIOTA",
"XBT": "BTC"
"XBT": "BTC",
"XDG": "DOGE"
},
"otherHoldings": [{
"BCH": 1.0
}, {
"BTG": 1.0
}],
"allocations": {
"BTC": 66,
"ETH": 33
},
"options": {
"targetValueUsd": false,
"rebalanceDeltaPct": 1.0,
Expand Down
12 changes: 10 additions & 2 deletions src/model/Coin.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,15 @@ export default class Coin {
}

getRelativeMarketCapRecommended() {
return Coinmarket.getRelativeMarketCapForX(this.symbol)
if (Settings.hasOwnProperty('allocations')) {
if (Settings.allocations.hasOwnProperty(this.symbol)) {
return Settings.allocations[this.symbol]
} else {
return 0
}
} else {
return Coinmarket.getRelativeMarketCapForX(this.symbol)
}
}

getAllocationDeltaPct() {
Expand Down Expand Up @@ -114,4 +122,4 @@ export default class Coin {

return (result.charAt(result.length - 1) === ',') ? result.slice(0, -1) : result
}
}
}

0 comments on commit 98af08b

Please sign in to comment.