Skip to content

Commit 98af08b

Browse files
committed
Merge branch 'release/1.8.0'
2 parents d5ab3e7 + 05352c4 commit 98af08b

6 files changed

Lines changed: 32 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
<a name="1.8.0"></a>
2+
# [1.8.0](https://github.com/benmarten/CryptoETF/compare/1.7.0...1.8.0) (2018-01-22)
3+
4+
5+
### Features
6+
7+
* **strategy:** allow for manual allocation recommendation ([#41](https://github.com/benmarten/CryptoETF/issues/41)) ([f47a63f](https://github.com/benmarten/CryptoETF/commit/f47a63f))
8+
9+
10+
111
<a name="1.7.0"></a>
212
# [1.7.0](https://github.com/benmarten/CryptoETF/compare/1.6.2...1.7.0) (2018-01-22)
313

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ The tool expects your settings in settings.json. Take a look at settings.example
3636
- *accounts*: Under accounts, fill in your api credentials for the exchange that you want to use. Delete the exchanges that you do not need.
3737
- *symbolMapping*: Some exchanges use different symbols that coinmarketcap.com. Hence here you can map the symbols, e.g.: map MIOTA to IOTA.
3838
- *otherHoldings*: A place to manually add some of your holdings. Notation is key: Symbol, value is amount of native currency.
39+
- *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.
3940
- *options*: These are specific options for the tool:
4041
- 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.
4142
- Default [false]: Use current portfolio value as target value.

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
"testLocal": "./node_modules/.bin/nyc mocha --require babel-core/register test/**/*.js test/**/**/*.js",
3333
"test": "NODE_ENV=test npm run testLocal"
3434
},
35-
"version": "1.7.0"
35+
"version": "1.8.0"
3636
}

settings.example.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,26 @@
4949
}]
5050
},
5151
"symbolNameMapping": {
52-
"Bitgem": "BITG"
52+
"Remicoin": "REMI",
53+
"KingN Coin": "KINGN",
54+
"ENTCash": "ENTCASH"
5355
},
5456
"symbolMapping": {
5557
"USD": "USDT",
5658
"STR": "XLM",
5759
"IOTA": "MIOTA",
58-
"XBT": "BTC"
60+
"XBT": "BTC",
61+
"XDG": "DOGE"
5962
},
6063
"otherHoldings": [{
6164
"BCH": 1.0
6265
}, {
6366
"BTG": 1.0
6467
}],
68+
"allocations": {
69+
"BTC": 66,
70+
"ETH": 33
71+
},
6572
"options": {
6673
"targetValueUsd": false,
6774
"rebalanceDeltaPct": 1.0,

src/model/Coin.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,15 @@ export default class Coin {
6060
}
6161

6262
getRelativeMarketCapRecommended() {
63-
return Coinmarket.getRelativeMarketCapForX(this.symbol)
63+
if (Settings.hasOwnProperty('allocations')) {
64+
if (Settings.allocations.hasOwnProperty(this.symbol)) {
65+
return Settings.allocations[this.symbol]
66+
} else {
67+
return 0
68+
}
69+
} else {
70+
return Coinmarket.getRelativeMarketCapForX(this.symbol)
71+
}
6472
}
6573

6674
getAllocationDeltaPct() {
@@ -114,4 +122,4 @@ export default class Coin {
114122

115123
return (result.charAt(result.length - 1) === ',') ? result.slice(0, -1) : result
116124
}
117-
}
125+
}

0 commit comments

Comments
 (0)