Skip to content

Instantly share code, notes, and snippets.

Avatar

Toni anthonytxie

View GitHub Profile
@anthonytxie
anthonytxie / hodl20.py
Created Mar 24, 2018
Hodl 20 Rebalancing Algorithm
View hodl20.py
def calc_allocations(self, date, quantity, cap):
"""Figure out ideal allocations for a given date"""
# {
# coin_name: (percent_allocation, data)
# }
top_market = self.get_top_market(date, quantity)
total_cap = sum([coin.market_cap for coin in top_market])
allocations = [{
@anthonytxie
anthonytxie / Correlations Between the Top 200 Coins and the Rest of the Market.ipynb
Last active Apr 13, 2019
Correlations Between the Top 200 Coins and the Rest of the Market
View Correlations Between the Top 200 Coins and the Rest of the Market.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@anthonytxie
anthonytxie / Rolling 30 Day Correlations.ipynb
Created Jun 25, 2018
Rolling 30 Day Correlations between BTC & BCH
View Rolling 30 Day Correlations.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View Correlations between the Top 20 Coins.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@anthonytxie
anthonytxie / Correlations Between the Top 200 Coins and Bitcoin.ipynb
Created Jun 25, 2018
Correlations between the Top 200 Coins and Bitcoin
View Correlations Between the Top 200 Coins and Bitcoin.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View Rebalancing-Backtest.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View Monte Carlo Simulations.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View Elon.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View get-elon-musk-comments.js
const axios = require("axios");
const axiosRetry = require("axios-retry");
const moment = require("moment");
const _ = require("lodash");
const Comment = require("./db/models/Comment.js");
let startDate = new Date("Jan 1, 2015 00:00:00").getTime();
const endDate = new Date("July 27, 2018").getTime();
const config = require("./config/config.js");
const mongoose = require("./db/mongoose.js");
const limit = 50;
View Binance Hot Wallet Blockexplorer API.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.