Category Archives: Money

Large BTC Daily Price Moves

Bitcoin the American Dream and Transcending Our Political Divide with CJ Wilson

Excellent Interview with CJ Wilson a Bitcoin investor and supporter who works hard to get the leaders in Washington that run the country educated on why BItcoin is a good thing for the country.

The podcast episode “Bitcoin: The American Dream and Transcending Our Political Divide” with CJ Wilson explores the potential of Bitcoin to unite diverse political perspectives and strengthen the American economy. CJ Wilson, a former Major League pitcher and co-author of the book Bitcoin and the American Dream, discusses how Bitcoin can provide equal financial access, especially for those on the lower economic rungs, while also contributing to energy grid improvements and rural economic revitalization. The conversation also highlights efforts to educate the political class on Bitcoin’s benefits, showing how it transcends traditional political divides to foster a more inclusive financial system.

You can listen to the full discussion here:

https://bitcoinmatrix.libsyn.com/bitcoin-the-american-dream-and-transcending-our-political-divide-with-cj-wilson

sellbuy-o-meter

The Golden Ratio Multiplier Trading Algorithm

This post covers a trading algorithm developed in Python code that uses Fibonacci numbers to set levels to trade off of. It is not a short term strategy, however it is a long-term strategy more of an investment strategy. It is based on a post by Philip Swift on https://www.lookintobitcoin.com/charts/golden-ratio-multiplier/

And he also has an original article on it on medium.

https://medium.com/@positivecrypto/the-golden-ratio-multiplier-c2567401e12a?sk=e38c4eff4357a1131bed57a3f4b3eeae

I have code for this here:

cbpro-cli-tools

Theory

The golden ratio multiplier is a great indicator, visually easy to confirm and makes a lot of sense on how it works. Best of all no fussy back-testing with parameter tweaks, you just need your eyes. I like how Josh Olszewicz  added the centerline, that is a nice addition. His video was a pleasant and positive surprise that I used to review the working of the golden ratio multiplier. I started using this indicator in early 2020.

On top of the basics that are covered by Phillip Swift , I have made some additions to the it that will work well in algorithmic form to allow it to run with constraints as code. Constraints are needed to allow it to pick the correct points to enter and exit along the curve. The method of (Dollar Cost Averaging) DCAing in and out is to use 20SMA BBands (Bollenger Bands) as a point to trigger DCA, using this as a filter to trigger on price exceeding lower/upper BBand. This tweak is based on the fact that I wrote code around this and was looking for a good way for when it should reasonably DCA, versus just triggering on a crossing the Fib # * YearlySMA (SMA, Simple Moving Average), or DCAing daily when under/above this line. As far as amounts to DCA, generally with accumulate/distribute investing, I tend to compound the trades in a way that accumulates heavier as distance increases below the YearlySMA line and distributes heavier as it goes further above the target Fib # * YearlySMA. The trading scaler used is a logistic curve , with n being the ratio of the current price to the yearly avg for buys (For sales ‘n’ is inverted by n being subtracted from the target Fib level multiplier + 1, which positions the curve out to where it scales up until it reaches the next higher Fib # and back down. Using the logistic curve formula (1+k)/(k + n^e) as a trade multiplier, for example with k=0.2 and e=4, it DCA’s in around 2x at the 0.8 * yearlySMA point,, 4x at 0.5…never more than 6x as it approaches that as a limit as n –> 0. I am planning publishing this code and documentation around it and will cite your video in it when I do.

Golden Ratio Multiplier Tutorial

Also Josh Olszewicz has a video tutorial on YouTube about this particular indicator using it with TradingView code it is a worth taking me 10 minutes or so to review this as background material along with looking at https://www.lookintobitcoin.com/charts/golden-ratio-multiplier/ and the original medium article . I am going to try to stick to the essence of the code and not so much the background material which could be read in viewed in those locations.

Code

This code is light weight and can be run on a Raspberry Pi as well as a Linux PC. It requires Python 3 as this is needed for the API.

The code is designed to use the Coin Base Pro API, however there is a middle layer that interfaces with the API via cbpro_buy_sell.py  If someone wants to interface with another API this just needs to be modified to make the proper calls into another exchange as an API on the back end of it. Think of it as a thin interface layer that goes between the code and the API itself.

cbpro-cli-tools

Dependancy : One import

this would be the import cbpro code that constitutes the module for the CV pro interface API.

Other Internal Dependancies

There are a few dependencies in the code thankfully they are local dependencies. The intent was to make this code as freestanding as possible without having to import various library’s other than what is barely necessary to make it operate. The first is a file called coretamodule.py. It holds a lot of functions that are used in multiple algorithm some of which will be used in the code to implement the golden ratio multiplier which is known as the arc just Python. The other necessary dependency is a piece of code that calls for polls periodically the CB pro ticker to add prices and volumes to aC SV file. This is run from some thing like Cron on a regular basis hourly daily five minutes what have you it is run at the same rate as a fib-ad high is run calling this code 1st to fill in the CSV file which will be read in by fib active high. I will try to make this publicly available on a site where it could  be pulled down with that lease this up to the current days data. Current days data

Core concepts

The idea of the code is that a 350 day moving average is calculated.This forms the basis of the ratio that is the golden ratio between the average and the price itself. When the price is below a threshold which is coded in to a dictionary of two pools as one. When below this level it will accumulate in the particular currency pair. There is another number in this threshold when it is above this ratio of price to 350 day moving average price. this forms the basis of the ratio that is the golden ratio between the average and the price itself. When the price is below a threshold which is coded in to a dictionary of tuples as one. When below this level it will accumulate in the particular currency pair. There is another number in this threshold when it is above this ratio of price to 350 day moving average price.above this range it will distribute the currency pair. Some fine tuning is made when it is above or below the threshold. The fine-tuning is based on Bollinger bands when it is touching the bottom bands in the Bollinger band 20 day bands and the minimum price for the 20 day period is also the same as this the price they buy is initiated.C onversely for the sale when the price is at the upper edge of the Bollinger band and the maximum price for the 20 day. Has been hit as a target a sale is initiated. This makes it dollar cost average in and out on a periodic basis. The idea is to have extra filtering to kind of find a peek in the valley of price movement without DCA (Dollar Cost Average) in too much or out too much.

defines.py

there is also a dependency file called defines.py this file has the portfolio amount in it. Now it is being dynamically allocated by using the cbpro_read_accts.py.  It will scale the amount of USD traded however BTC an ETH have to be adjusted within the main function to pick values that are comfortable and proper for the trading circumstances. This allows for configuration between all of the pairs.Also in the defines file you will have to enter the key passphrase and be 64 secret, this will allow the trades to occur through the API as this is passed on by the main code.

 

Also in the defines file you will have to enter the key passphrase and be 64 secret, this will allow the trades to occur through the API as this is passed on by the main code.

 

 

Outputs and Logs

The output from the code is interpret able humanly to understand what is going on as well. There are rose of prices after the initial currency pairs listed these prices represent the various thresholds at the end it states whether it is holding or not and also what the threshold and target are the threshold being the Bollinger bands edge and the target being the lowest to highest price for the 28th time.Additionally there are log files created when the code runs there are several that are verbose and specific to a underlying currency and there is one summary file. The verbose files contain the returned output from the API function call which is a dictionary of values return from CB pro. There will also appear within the non-verbose output as a message usually relates to some thing that needs to be corrected possibly a bug or some thing like insufficient funds. This is driven by the message key from the CB Pro API return dictionary.

 

The code makes every  attempt to avoid this because it uses limit orders and it also checks the balances in the supply. The underlying currency and the to be bought or sold currency itself.

Compounding Positions

There is also a logistic scaler in this code. The logistics scaler works by increasing the amount of currency bought when the price falls below the threshold of the golden ratio multiplier which is by default one. This allows increasing the amount purchased automatically but also reaches a limit as the ratio between the price and the 350 day moving average approaches zero. It will go to a limiting constant. The opposite is true for cells there is the threshold that is coded into the dictionary of tuples the logistic scaler takes in that value plus one informs a curve that goes from the upper threshold to all 1+ this value and increases the amount sold after this plus one position it will decrease once again to zero. The idea is that it scales out hard as the price rises but has a limiting factor if it rises above the threshold too far. The idea would be to manually address these thresholds to what is expected of the currency. So periodically maintenance might be required on the threshold or they might just be a set it and forget it for some people. This all depends on how you want to invest.

 

As the price rises but has a limiting factor if it rises above the threshold too far. The idea would be to manually address these thresholds to what is expected of the currency. So periodically maintenance might be required on the threshold or they might just be a set it and forget it for some people. This all depends on how you want to invest.The default or one and two in a two pole for every currency pair. It is possible to adjust days as needed. It is also possible to adjust the logistics scaler Constants which are KNEE is the exponential constant which controls the rate of rise of the curve and key controls the multiplier affect in the amount that would be traded in the limit.

Outer Loop

The code works by looping through a list actually a dictionary of underlying currencies US D/ETH/BTC as underlyings. Then there is a function call and the inner currencies are called in a loop these other currencies that are actually traded against the underlying currencies. This allows money currency pairs to be traded and others to be added in the future.

CSV Data Collection using API

The caveat here is that there has to be enough data in the CSV file to go back for the time. And if a currency one is to be added it has to be attitude there to harvest the ticker data. I suppose in theory it would be possible to fit all data into the file itself to add a prior prior currency that’s been running in the ticker for a while if someone is motivated not to do that. Having this code in a folder and having it called by Cron preferably using a script calling the script first then harvesting the price volume data then calling for code it will work seamlessly as a plug and play algorithm. Because it is using the golden ratio multiplier there is no need for back testing as this has been proven out to work by Philip Smith Swift in his presentation and write up online.

Obviously this code could be modified in anyway the 350 day. Could be changed to something else along with the 20 day Bollinger band. And the threshold as I said earlier our configurable.

 

 

 

 

Monetary System Escape Hatch

MEH: Money Escape Hatch

 Money is power – your money, the power to spend.

An escape hatch from the Monetary System

Recently I was the victim of several types of fraud through the legacy monetary system, banking counter-party risk basically.

  • Debit card fraud: A transaction that I did not make showed up on my account. Required getting a new card and the bank did take care of the fraudulent charges.
  • A fraud about debit card fraud: A fraudster called me, preceded by a text that told me of a suspicious card transaction, spoofing the banks own phone number no less. They tried to get me to give up my credentials over the phone and then pretended there were several checks written against my checking account. They tried to run me through the process of setting up Zelle and having me send money to a weird email address. I just played along and acted like I didn’t understand how to use the Internet until the call dead ended.
  • Law firm fraud: A law firm, a lawsuit mill, files a fraudulent suit in the wrong venue using a fake address, so I get sued without my knowledge, resulting in a default judgment. I caught this in time before they were able to execute the judgment, or else they could have performed a money grab out of the bank account, without my knowledge. I informed the court of the fraud, the lawfirm, the Consumer Finance Protection Bureau  CFPB and all other parties that had a hand in this. This was a shocker as I didn’t even realize that his type of fraud existed.

Thoughts

After all this I was thinking about what could be done to lock up money, away from the reach of fraudsters as there is counterparty risk to a lot of things money related, especially in the legacy banking world. Some banks don’t even offer good security, like 2FA via a security key only and NOT 2FA texting to a mobile number that can be spoofed or email, equally weak.

Self custody of Bitcoin seems like the most solid way in light of the weaknesses in the monetary system. Why Bitcoin? Other tokens have less utility, why do we need 1000s of them, and some might be counted as securities someday and some have more inflation as  tokens are minted at the whim of the founders or core team and so on.

But, there are caveats:

  • You need to know what you are doing or else you can blow you cover and compromise your keys and therefore coins and also be too ‘public’ with transactions.
  • Corollary: Not your keys, not your coins!
  • Don’t trust, verify
  • Bitcoin is pseudo anonymous. You are sitting behind a public key and if you use a limited set of keys repeatedly it is possible to trace, via history on the blockchain, who you are and how many sats you have stacked. This is particularly true of an address used, lets say as a donation or payment address which is static. Ideally, you want dynamic addresses. Revealing too much information like this could make you a magnet for fraudsters that decide it is worth trying to, let’s say hack your warm wallets by injecting malicious code on your phone or PC, via an email with a cat video. Or spoof your phone number to bypass 2FA and so on. Heck, they might even try to track down where you live via social media and park in front of your house and break into the WiFi by stepping in on the four way handshake used to secure it, then they are on your home network and have access to every device directly!
  • Always visually verify addresses you send to. Just in case some copy/paste virus gets in the middle and changes the address.

 

Suggestions for caveats:

  • Your keys = Your Coins: Store the bulk of your stack on a cold wallet or paper wallet, in a safe place. Seed phrases as well. Keep only a small amount on a hot wallet, like an app or web wallet, exchange,etc.
  • Stay Private: Use methods to conceal the path of transactions by breaking the address linkage, effectively creating dynamic addresses. Porting through privacy coins comes to mind here and for a BTC only solution, Wasabi wallet, linked to a cold wallet such as Coldcard, BTC only wallet that can be air gapped.
  • Equipment SEC: Air gapped wallet allows you to use something like an SD card to move a partially signed transaction to the cold wallet to sign and back to a hot wallet that is watch only, so it can only take in but, not spend BTC. You can only spend by creating a partially signed transaction and moving it by hand using SD card to cold wallet, signing and moving it back via SD card. Sounds complicated but, is secure. No compromise and follows the verify and don’t  trust the hot wallet sitting on the phone or PC connected 24/7 to the Internet, making it only medium secure. Keep phones, PCs and Wifi secure, good passwords/biometrics and keep thinking through the holes lurking in security.
  • Dumb Human Things: Verify addresses when sending, use excellent passwords and PINs, read the instructions on equipment, like wallets, seedphrase security. Don’t get conned, don’t brag, don’t accidentally dox yourself. People are always inventing new ways to screw things up, so even with the best technology and encryption, mistakes happen, look on the Internet for more examples.

 

Idea on using Wasabi Wallet to enhance privacy along with cold storage

You can use Wasabi Wallet to enhance the privacy of your coins before transferring them to a cold wallet. Here’s a step-by-step process:

  1. Transfer Funds to Wasabi Wallet:
    • Transfer your funds from the exchange or other warm wallets to your Wasabi Wallet. This can be done by sending the funds to an address generated by your Wasabi Wallet.
  2. Initiate CoinJoin Transaction in Wasabi:
    • After receiving the funds in your Wasabi Wallet, initiate a CoinJoin transaction within Wasabi. This process will combine your transaction with those of other users, significantly enhancing privacy.
  3. Wait for Confirmation:
    • After initiating the CoinJoin, wait for the transaction to be confirmed on the Bitcoin network. This may take some time, as it depends on network congestion and the number of confirmations required.
  4. Send Funds to Cold Wallet:
    • Once the CoinJoin transaction is confirmed, you can safely send the funds from your Wasabi Wallet to your cold wallet. This step ensures that the funds you send to the cold wallet have undergone the privacy-enhancing CoinJoin process.
  5. Consider Multiple Rounds of CoinJoin:
    • For additional privacy, you may consider repeating the CoinJoin process with the funds in your Wasabi Wallet before sending them to the cold wallet. This can be done by initiating another CoinJoin transaction within Wasabi.

Remember, while this process can significantly enhance privacy, it doesn’t provide absolute anonymity. Also, the privacy features depend on the number of participants in the CoinJoin process, so it’s beneficial if more users are actively participating in CoinJoin transactions.

Always stay informed about the latest features and best practices in using Wasabi Wallet, as the specifics of the wallet’s functionality may evolve over time. Additionally, consider the transaction fees and potential delays associated with the CoinJoin process and Bitcoin network confirmations.

Alternative Idea Using Monero Swap

Just an idea that I was thinking of, not sure if it would be as good as the solution above using Coinjoin. But, the idea is to take some kind of coin BTC, USDC, whatever that you on ramped from USD via an exchange. Use some kind of swap, like SimpleSwap or the swap feature of a wallet such as Exodus and swap the non private coins from an exchange into XMR on a wallet, then swap to something like BTC on the cold wallet. When spending, run backwards, swap to XMR, then to the crypto of your choice and spend

When you convert BTC to XMR, the transaction history of the BTC is effectively broken, as the privacy features of Monero make it difficult to trace the source of funds. However, when you swap back to BTC, the privacy features of Monero may not be as effective, and your transactions could potentially be traced from that point onward.

It’s essential to note that while Monero provides strong privacy features, the overall privacy of any cryptocurrency transaction depends on various factors, including the platforms and services used for the swaps. Additionally, the regulatory environment surrounding cryptocurrency exchanges and transactions may impact the level of privacy you can achieve.

Word-cloud-for-post-on-large-price-moves

Thoughts on the best BTC price moves

As the great and powerful Satoshi Nakamoto once said, “If you don’t believe me or don’t get it, I don’t have time to try to convince you, sorry.”

For a while I have used a piece of code that started as back-testing code and forked it to produce output whenever BTC-USD makes a 2 standard deviation move in price up or down. Basically I manually adjusted the threshold that is normally a fluid value in backtesting to a fixed value, so that 95% of the time a U for Up, or D for Down move is not recorded, It’s counted as O, which means nothing interesting happened and is not printed. CRON runs this hourly and the machine responsible for trading runs 24/7 and collects prices, since August 28,2018. It even plays a sound when one of these outlier moves occurs.

Here are a few lines from the end of the output….

2024-01-03 16:00:02.618000       63874 42197.47 43004.35 U 2 1.02
2024-01-03 19:00:03.434000       63877 42923.71 42269.13 D 2 0.98
O: 43795  95.0%
D: 1165  2.5%
U: 1148  2.5%

The top two lines have a time stamp followed by a tick count, this is where it is in the data set, in order, adding 1 per hour. Next are the two prices, the starting and ending prices, U or D, signalling which way it just went. The next number shows how many hours have elapsed since the last radical move followed by the scale of the move. This is a rounded number that shows what number would be required to multiply the first price to get the current price, how big a move in other words.

2 Standard Deviations for Bitcoin

Daily

I recently adjusted the calibration threshold as BTC is settling down into less radical swings as time goes on. Currently it is….

THRESHOLD = 0.01459 # 0.0156

…which means on an hourly basis a 1.459% move registers as a 2 standard deviation move. It was 1.56% earlier this year, so volatility is trending down over time.

Can that be tradable, not likely as fees and slippage would most likely eat up the 1.459%, granted some higher swings do occur and I have pondered this. What is you bought all the big down moves and sold on the big up moves. Sounds good in theory and would most likely only work in an up market or else, you just wind up buying at bad entries and ‘bag hold’ too much at a loss until the next bull run.

Weekly

I got the idea to look at a daily and weekly time frame. Weekly is such a short output that I will paste it here….

Start of Data: 2018-09-05
Lines of input data: 279
Lines to process: 279
2018-11-21 05:00:11.243000       17809 6268.44 4452.68 D 10 0.71
2019-04-03 04:00:15.519000       17828 3976.88 5050.01 U 18 1.27
2019-05-15 04:00:15.266000       17834 5782.6 8063.78 U 5 1.39
2019-06-26 04:00:16.011000       17840 9139.01 12228.39 U 5 1.34
2019-07-17 04:00:14.972000       17843 12983.74 9411.06 D 2 0.72
2020-03-15 04:00:05.033000       17878 8749.01 5168.75 D 34 0.59
2020-08-02 04:00:06.489000       17898 9686.6 12000.0 U 19 1.24
2020-12-20 05:00:12.005000       17918 18865.0 23460.71 U 19 1.24
2021-01-03 05:00:14.866000       17920 26732.29 33231.68 U 1 1.24
2021-02-14 05:00:19.359000       17926 38365.06 47607.09 U 5 1.24
2021-03-14 05:00:09.349000       17930 49437.95 61191.88 U 3 1.24
2021-08-01 04:00:03.128000       17950 34192.29 42461.2 U 19 1.24
2022-06-19 04:00:02.056000       17996 27515.55 18282.06 D 45 0.66
2023-03-19 04:00:02.137000       18035 20598.23 27282.54 U 38 1.32
D: 4  1.4%
O: 264  95.0%
U: 10  3.6%

A few things to note:

  • There is asymmetry as the market has in general been rising since 2018, so there are only 4 ‘large’ down moves and 10 up. 1.4% weeks are up moves, 3.6% are down. The number after U and D is the weeks between moves.
  • Note the magnitude of the moves. They are truly massive. As the threshold is now 0.235.
  • Note that the 5 sequential up moves in a row 2020-2021 barely made in over the threshold at 1.24
  • Make note of the fact that Bitcoin is calming down over the years by looking at how many times per year it makes these epic moves.
  • Last but not least. I wonder if the what the linear regression of the prices would tell. Perhaps good targets for the future?
Large Weekly BTC Price Moves
Large Weekly BTC Price Moves

From now on, I will monitor this more carefully. As one can see, entry and exit although infrequent would have lead to stellar performance. I’ve been doing crypto TA and writing related code for almost 6 years now and it is still interesting that some new price relationships can be sussed out.

Looking ahead

It’s a guess buy based on the chart above it will be worth seeing if there is a pullback below the price of the blue linear regression termination, 37K-ish down to the termination of the D and E price lines 20598.23 27282.54. It will be interesting to followup on this.

Daily

For daily the THRESHOLD = 0.076, so that means greater that 7.6% moves are counted. Below I have pasted in the 2022 to 2023 results. 2022 being terrible and 2023 awesome. I let the reader ponder the readability of these price moves.

 

2022-02-05 05:00:03.175000       19053 37326.16 41505.25 U 62 1.11
2022-02-24 05:00:04.472000       19072 38042.82 35122.81 D 18 0.92
2022-02-25 05:00:04.643000       19073 35122.81 38740.11 U 0 1.1
2022-03-01 05:00:06.659000       19077 37830.34 43388.77 U 3 1.15
2022-03-09 05:00:02.706000       19085 38554.62 41656.28 U 7 1.08
2022-05-06 04:00:02.780000       19143 39727.55 36446.18 D 57 0.92
2022-05-10 04:00:02.150000       19147 33556.09 30678.51 D 3 0.91
2022-05-12 04:00:02.124000       19149 31191.22 28234.93 D 1 0.91
2022-05-13 04:00:02.622000       19150 28234.93 30523.85 U 0 1.08
2022-06-14 04:00:02.293000       19182 25483.35 22074.01 D 31 0.87
2022-06-17 04:00:02.808000       19185 22182.06 20359.29 D 2 0.92
2022-06-19 04:00:02.056000       19187 20424.2 18282.06 D 1 0.9
2022-06-20 04:00:02.514000       19188 18282.06 19961.12 U 0 1.09
2022-07-08 04:00:02.559000       19206 20465.35 22125.65 U 17 1.08
2022-07-28 04:00:01.952000       19226 21076.25 23137.12 U 19 1.1
2022-09-14 04:00:02.511000       19274 22235.95 20324.97 D 47 0.91
2022-11-10 05:00:02.217000       19331 18242.1 16433.61 D 56 0.9
2023-01-14 05:00:02.777000       19396 18820.73 20901.76 U 64 1.11
2023-01-21 05:00:02.053000       19403 20991.31 22602.95 U 6 1.08
2023-02-16 05:00:02.079000       19429 22092.46 24634.33 U 25 1.12
2023-03-10 05:00:02.124000       19451 21737.7 19877.69 D 21 0.91
2023-03-13 04:00:01.980000       19454 20598.23 22326.45 U 2 1.08
2023-03-14 04:00:02.715000       19455 22326.45 24517.05 U 0 1.1
2023-08-18 04:00:02.811000       19612 28619.6 26395.38 D 156 0.92
2023-10-24 03:00:02.742000       19679 30389.89 34553.97 U 66 1.14
D: 46  2.4%
O: 1856  95.0%
U: 51  2.6%

 

Looking at the plot for daily and remember this does not mean the X axis is time, just moves, even though it does look similar to a price -vs- time chart. In this case both regression lines overlap 100%.

 

Large BTC Daily Price Moves
Large BTC Daily Price Moves

Looking ahead

This is a guess but looking at this I am inclined to think a pullback between the regression line termination at 40K and the termination of the D and E price lines at 30 and 35K would be something to keep and eye out for.

Alternative Daily Move Chart

Taking the geometric mean of the daily and weekly thresholds, the result is 0.133. This produces using a daily tick an output that has as many large price moves as the weekly chart and can be seen as an alternative while slightly different, lines up similarly on the chart. The moves are roughly 3 standard deviation moves in this case.

Start of Data: 2018-08-30
Lines of input data: 1955
Lines to process: 1955
2018-11-20 05:00:17.949000       17880 5495.99 4641.55 D 81 0.84
2018-11-25 05:00:13.877000       17885 4301.01 3632.02 D 4 0.84
2019-04-03 04:00:15.519000       18014 4177.0 5050.01 U 128 1.21
2019-05-14 04:00:15.992000       18055 7016.99 7963.14 U 40 1.13
2019-06-28 04:00:15.313000       18100 12821.64 11110.99 D 44 0.87
2019-10-26 04:00:17.489000       18220 7455.01 9599.17 U 119 1.29
2020-03-13 04:00:04.431000       18359 7659.09 5385.44 D 138 0.7
2020-03-20 04:00:04.240000       18366 5301.62 6163.32 U 6 1.16
2020-04-30 04:00:04.743000       18407 7821.73 9291.9 U 40 1.19
2021-01-06 05:00:08.853000       18658 30880.51 35456.93 U 250 1.15
2021-02-09 05:00:09.512000       18692 38618.01 46888.08 U 33 1.21
2022-03-01 05:00:06.659000       19077 37830.34 43388.77 U 384 1.15
2022-06-14 04:00:02.293000       19182 25483.35 22074.01 D 104 0.87
2023-10-24 03:00:02.742000       19679 30389.89 34553.97 U 496 1.14
U: 9  0.5%
O: 1940  99.3%
D: 5  0.3%

 

Large-BTC-Daily-Moves-w-Linear-Regression-0.133
Large-BTC-Daily-Moves-w-Linear-Regression-0.133

 

Code

Code is on Github, it is quite a hack as it was made from pieces of other backtest code and production code that has not been cleaned or refactored.

https://github.com/erickclasen/cbpro-cli-tools/blob/main/uod.py

Misato Katsuragi

Kelly Criterion

If money is your bread then nothing else matters.

The Kelly Criterion is something anyone who trades, invests or even gambles must know. I have a brief summary below and some additional resources at the end of the summary.

There is also a great book devoted to this topic, Fortune’s Formula by William Poundstone, a must have book for any serious investor.

The Kelly Criterion, also known as the Kelly strategy, Kelly formula, or Kelly bet, is a mathematical formula designed to help people determine the optimal size of a series of bets. It’s named after John L. Kelly, Jr., who introduced the concept in a 1956 paper titled “A New Interpretation of Information Rate.”

The Kelly Criterion is commonly used in gambling, investing, and other areas where decisions involve uncertainty and risk. The goal of the Kelly Criterion is to maximize the long-term growth of capital by finding the optimal fraction of capital to invest in each opportunity.

The basic formula for the Kelly Criterion is:

Kelly-Critierion
Kelly-Critierion

The formula tells you what percentage of your current capital should be invested in a particular opportunity, given your assessment of the probability of success and the odds being offered.

It’s important to note a couple of things about the Kelly Criterion:

1. Risk of Ruin: The Kelly Criterion can be aggressive. Betting too much of your capital, even with a positive expectation, can lead to significant losses. The criterion doesn’t consider the risk of ruin, which is the risk of losing your entire capital.

2. Estimates are Crucial: The accuracy of the criterion depends heavily on the accuracy of your probability estimates. If your estimates are inaccurate, the strategy might not perform well.

3. Logarithmic Utility: The formula assumes logarithmic utility, meaning that the investor’s goal is to maximize the expected logarithm of wealth. This utility function helps to balance between risk and reward.

To use the Kelly Criterion, you would apply the formula to each opportunity, and the resulting fraction represents the proportion of your current capital that you should invest.

Keep in mind that many variations and adaptations of the Kelly Criterion exist to address specific situations and concerns. It’s a tool that requires careful consideration and understanding of the underlying assumptions and risks.

 

To learn more, see these resources

https://www3.cs.stonybrook.edu/~skiena/691/2007/lectures/Kelly.pdf

http://r6.ca/blog/20070816T193609Z.html

https://www.economist.com/media/globalexecutive/fortunes_formula_e.pdf

https://towardsdatascience.com/python-risk-management-kelly-criterion-526e8fb6d6fd

Stacks of Coin

Bitcoin’s Soft Underbelly

The best way to make money is to go out and do it yourself.

Hey ChatGPT, Do you what Bitcoin is?

Yes, I am familiar with Bitcoin. Bitcoin is a decentralized digital currency that uses cryptography for security and is supported by a peer-to-peer network. It was created in 2009 by an unknown individual or group of individuals using the pseudonym Satoshi Nakamoto.

Bitcoin is based on a distributed ledger technology called the blockchain, which allows it to operate without the need for a central authority. Transactions are recorded in blocks, which are linked together in a chain. This chain of blocks is secured using complex mathematical algorithms, which makes it extremely difficult to alter the record of transactions.

Bitcoin can be used to send and receive payments over the internet, and it has attracted a lot of attention due to its potential to disrupt traditional financial systems. However, it has also been associated with criminal activities, and its value can be volatile.

Hidden Risks

Just to linger on the topic for a moment, Bitcoin, has another risk that does not get enough mention. Cryptography has a shelf life and eventually breaks, either via some discovery of a short path to crack a private key given a public key or collisions. Bitcoin uses SHA256 encryption which seems safe for now but, as with all hash algorithms, there is no closed form solution that shows it is watertight. It’s more along the lines of, well the last cryptographic code broke because of X,Y or Z, so lets beef the new one up to be stronger in those areas. But, someone might find a crack in SHA256 tomorrow, just like what happened for SHA-1 not too long ago From what I recall it was a university research project that broke it. Or looking at the second failure mode, when will brute force collision with a large number of private keys become possible and profitable, It’s only a matter of time. 256 bits is a lot a space to brute force through. But, computing power (Now multi threaded quantum computing too ) grows over time and large entities such as nation states with deep pockets could do something like this at some point in the not so distant future. Is this possible, who knows now, but someday it might.

There are known knowns, known unknowns and then the ones that get you when you least expect it, unknown unknowns and this risk clearly falls in that category.

Interesting to Skim

https://www.whitehouse.gov/wp-content/uploads/2022/11/M-23-02-M-Memo-on-Migrating-to-Post-Quantum-Cryptography.pdf

Ancient Psychology

True good is only possible when the self is aware of the suffering of the other and wants to minimize the suffering.

An interesting thought is to think about is when did humans or higher animals become self conscious and therefore developed a theory of mind that allows them to know what it feels like for others to experience the same thing that they might.

To make this more concrete, let’s use an example, two for that matter, one good behavior and one not so good. A bonobos monkey accidentally breaks a branch off of a tree and it falls on the head someone below, “… the film’s animal advisor, Patrick Bleuzen, who remarked that ‘Once I got hit on the head with a branch that had a bonobo on it. I sat down and the bonobo noticed I was in a difficult situation and came and took me by the hand and moved my hair back, like they do. So they live on compassion, and that’s really interesting to experience.” Excerpt From FREEDOM: The End Of The Human Condition Jeremy Griffith. The behavior  suggests that they can feel what it like to be in a position of compassion towards others.

Example two, an angry dominant male chimp snatches an infant from a female and dangles it precariously over a cliff edge. This is a clear example of control and an I don’t have to hit you but, I can get what I want from you by threat alone.

So what’s the threshold. What level does an animal have to be at to exhibit this behavior. How do we test for self awareness to begin with. One way that comes to mind is can they recognize themselves in the mirror. I decided to look it up, sure enough it has been done. As one would guess higher primates pass the test along with dolphins and others. See Mirror Test for more.

So once one is self aware, it is one easy step to start projecting that out to others and develop a theory of mind. And, this might be the root of good and evil. ( I started thinking about this was when I read partway through FREEDOM: The End Of The Human Condition by Jeremy Griffith )

For how can one know good and evil other than having a theory of mind for the other. True evil  is only possible when the self is aware of the suffering of the other and wants to maximize this suffering. True good is only possible when the self is aware of the suffering of the other and wants to minimize the suffering. The good news is that there is more good available because good can go beyond just minimizing suffering but, beyond it to generate positive benefit above this point, towards freedom from the potential of suffering and on to the path of the pursuit of happiness. Good can also generate the resources to create a reserve to push out and prevent suffering.

Cooperation

Think of it this way, people in small groups or a community can cooperate to store up a harvest and other reserves to carry the individual and a community through the hardest of times. The more that is stored up, the more that can be shared and the worse conditions might have to be before there is suffering.

Kye

In modern times this form of cooperation can be extended to one of the best resources that can be held in reserve collectively and used to do good for people involved cooperatively. The resource is money and the tool is known as a kye in Korean and, pronounced as geh in English. A form of this concept exists in many other countries around the world. It is basically a loan circle among a group of close friends and/or relatives and can expand to be as large as a community (good for the community such as providing a water well can be funded this way). Money goes into a kitty on a periodic basis, usually monthly and then someone from the group gets a payout to start a business, cover an emergency, obtain a down-payment on a house and so on. Think of it as a communal savings plan of sorts. Money is effectively harvested and concentrated to do good for all the participants on a rotating basis which can be determined by a leader of the group, a vote, consensus, random draw or rotation around the group in turn. To read more about this and the versions from other parts of the world read The Radical Economics of Lending Your Friends Money and/or Rotating Savings and Credit Association (ROSCA) . The descriptive category that is one level higher than this is Collaborative Finance.

The Circle of Self

In a way personal money can work like this too, with yourself, you can give the gift of it to your future self from your present self, your own mini loan circle, with now-you giving and future-you on the other side of it receiving.

Money is not quite about happiness after all

Money really does not buy happiness and having it beyond a certain point creates less of what economists call utility.

  • The first million is exciting, the second not quite as much.
  • Twenty dollars to someone living on the street with nothing is worth far more in utility than a person that is making 100K per year, it has a lot more utility for the former than the latter.

A thought experiment is to pretend that you have 10x your financial resources, 10x in income and in the bank, just divide everything that you see the price of by 10 and think of that for a minute for a perspective of how it would feel. Then do the opposite. It’s like having a utilty-scope and gives you a sense of what it feels like to slide into different financial brackets.

But, money has it’s limits to buying happiness as we can see with falling utility as we have more of it. But, it ( having enough buffer ) does buy a way out of misery, which is just a word for a continuous never ending path of suffering. Savings is just money set aside to share with your future self.

It’s expensive to be poor

  • In central Nairobi water comes out of a tap. In a shanty town outside of Nairobi it gets delivered in plastic containers at 10 times the cost of the tap water and with much more inconvenience to use.
  • If you are too poor to have enough money in your banking account to cover a check that was written to you, you can go to the originating bank and cash it. In the past this was free and why not, the money is right there, isn’t it? Totally verifiable and available on the spot. Nowadays you can expect a service fee of $5 for the convenience of getting the check cashed.

These and worse examples of predatory lending like payday loans, subprime lending make access to money as a resource more difficult for the poor.

How much to save?

It depends, some say 6 months of your income. I’d take that further by looking at what the FIRE (Financial Independence Retire Early  ) movement does. Save 6 months worth of expenses as a start, but don’t stop there, get rid of debt, learn how to raise your savings rate and learn how to invest what you have saved. The more you have, the further you push out the gap between comfort and potential suffering for you and others around you. Aim for true financial independence. Something major breaks, a big expense, no problem. If in the end it’s become a large pile of fat stacks of cash that you don’t need all of, well you can pay it forward to do good for someone else, a reverse kye maybe. Plus, having money saved up gives you more options in a positive way, life changes, plans change, unforeseen opportunities arise and being there at the right place and the right time means nothing unless you have the resources, usually money,  to make the opportunity manifest into reality.

 

Chicken Tenders

Chicken Tenders Monetary Standard

Really? Not sure on this idea, so let’s ask ChatGPT

Could chicken tenders be used as a standard?

Chicken tenders, or strips of chicken breast that are breaded and fried, could not be used as a standard for currency or any other type of financial system.

There are several reasons why chicken tenders (or any other type of food) could not be used as a standard. One reason is that they do not have a stable value. The value of chicken tenders (or any other type of food) can fluctuate based on a variety of factors, including supply and demand, production costs, and market conditions. This makes them an unreliable store of value and an unreliable medium of exchange.

Another reason is that chicken tenders (or any other type of food) do not have a widely recognized value or a widely accepted means of exchange. Unlike fiat currencies, which are issued by governments and accepted as a means of payment in most countries, chicken tenders (or any other type of food) are not recognized as a legitimate form of payment and are not widely accepted as a medium of exchange.

Finally, chicken tenders (or any other type of food) are subject to spoilage and deterioration, which makes them a poor choice as a standard for currency or any other type of financial system.

Overall, it is not practical or feasible to use chicken tenders (or any other type of food) as a standard for currency or any other type of financial system.

Create a stable coin based on chicken tenders.

It would not be practical or feasible to create a stablecoin based on chicken tenders. While it is theoretically possible to create a stablecoin based on any type of asset, including chicken tenders, there are several reasons why it would not be practical or feasible in this case.

One reason is that chicken tenders (or any other type of food) do not have a stable value. The value of chicken tenders (or any other type of food) can fluctuate based on a variety of factors, including supply and demand, production costs, and market conditions. This makes them an unreliable store of value and an unreliable medium of exchange, which would make it difficult to maintain the stability of a stablecoin based on chicken tenders.

Another reason is that chicken tenders (or any other type of food) do not have a widely recognized value or a widely accepted means of exchange. Unlike fiat currencies, which are issued by governments and accepted as a means of payment in most countries, chicken tenders (or any other type of food) are not recognized as a legitimate form of payment and are not widely accepted as a medium of exchange. This would make it difficult for people to use a stablecoin based on chicken tenders in everyday transactions.

Finally, chicken tenders (or any other type of food) are subject to spoilage and deterioration, which would make it difficult to maintain a stablecoin based on chicken tenders over the long term.

Overall, it is not practical or feasible to create a stablecoin based on chicken tenders or any other type of food.


On a more serious note check out The Bitcoin Standard, which might actually work.

Also there are interviews ( by Jordan Peterson and Lex Fridman ) with Saifedean Ammous an Austrian economist who wrote, The Bitcoin Standard: The Decentralized Alternative to Central Banking, see this post … http://erick.heart-centered-living.org/info-links/jordan-peterson-bitcoin-interview/

Precious Metal Accumulation and Distribution

Precious Metal Exchanges

A few examples to get started with…

https://www.coinexchangeny.com
https://libertycoin.com/
https://www.jmbullion.com/

Resources

Silver Dragons

The Silver Dragons channel is about silver stacking, buying silver, silver investing, precious metals, gold investing and anything to do with silver or gold …
https://www.youtube.com/channel/UCucqfNRyBkieAop_LDUqHEg

Yankee Stacking

One New Englander trying to stack silver and gold the “Yankee Way”!Stack silver and gold to hedge against our debt-fueled, fiat currency-based economy that …
https://www.youtube.com/c/YankeeStacking

Tickers on Yahoo Finance, this is where the iPhone gets prices

SI=F Silver Futures next delivery period, close enough to the spot price.
GC=F Gold Futures next delivery period, close enough to the spot price.
DXY (DX-Y.NYB) Dollar Index, strength of the USD against a basket of other currencies, The six currencies included in the USDX are the Euro, Swiss franc, Japanese yen, Canadian dollar, British pound, and Swedish krona. When the dollar goes up, metals go down and vice versa.

Investing Basics

All of the basics of investing apply to not only gold and silver but in general, only this first idea is specific to gold and silver.

Do you buy gold, silver, both?

A general rule for investing that gives a short answer for Gold -v- Silver.

When the ratio of the Gold price divided by the Silver price is…
> 80 Buy Silver
60-80 Buy Both
< 60 Buy Gold
Some people will even pairs-trade (swap) between the two to accumulate more metal over time. As in when > 80 buy silver by selling gold. When < 60 buy gold by selling silver. 60-80 is a neutral zone do nothing.

DCA

The following applies to metals or any other long term investment.

You can’t always predict the right moment to move a large sum into or out of an investment.

For investing it is best to dollar cost average (DCA) in and out of a position. Buying and selling on a periodic basis helps accumulate and distribute at average reasonable prices over the long haul of time. This can be done weekly, monthly, quarterly. And it could be done by considering good prices to buy or sell at, with a buy lower and sell higher plan.

Buy Lower/Sell Higher

The following applies to metals or any other long term investment.

You can’t always pick the bottom or top of a market.

A simple rule is to buy when the price is lower than it has been in a while, buying a local low and the converse on highs. The concept can be used to improve upon the ‘blind’ DCA, buy on a regular periodic basis.
Looking back at the high or low from the past year, or market cycle works fine for picking a reasonable high and low point. Keep buying in small amounts when below a local low and selling small amounts when above ( preferably longer timeframe ) local high. It is not always worth trying to ‘time’ the tops and bottoms of the market as this is very tricky even for sophisticated traders.

Judging Value Simply

The following applies to metals or any other long term investment.

Is it a bargain or overpriced?

When starting out it in investing is hard to judge value, so a quick and easy to spot way is the best way to start to get thinking about value.

A reasonable rule is to use the midpoint between the last big high or low price and keep accumulating up to that midpoint. In this manner you can easily tell that you are buying ‘value’ and not buying the asset when it is overpriced. Then hold the asset until the appropriate market cycle which reaches beyond local highs, preferably higher than a previous high in the future and do the converse, slowly sell above the midpoint which should always be checked out to make sure it is in profitable range. It is easier to sell into a rising market as when the price hits a peak sometimes it can drop violently. Prices tend to fall faster than they rise.

Price Charts

How to view the price and a handy tool, the moving average of price.

Kitco among others has decent charts for metals that have moving averages on them as well. The moving averages are a tool that can help with trading and investing. They act as guides to see to position of the price relative to a slower,smoother version of the price, the average price. These charts can be used to help DCA in and out using the buy lower/sell higher, judging value simply or using the moving averages as described below to use a trading type strategy or to accumulate and distribute for long term investing.

Using charts as a  trading tool example

Moving averages can be used to follow a trend. When the price is above a moving average or even better, a short time average (like 14,30,60 days) is above a long average (200 days) there is an uptrend. It is possible to follow a trend by buying in when the short average crosses the long average and sell when the short average goes below the long average. This is an example of a ‘trade’, specifically a long trade or going long. Technically this is called a Dual Moving Average Crossover. This is just one simple example of many trading styles.

Using charts as a tool to accumulate and distribute example

Moving averages can be also used to accumulate and distribute by looking for lows that are worth DCA-ing in and out on. For example good buys would be in the zone where the following line up, ..

  • short moving average lower (try 30 or days- blue line on Kitco chart) than long moving average. 200 day, green line on Kitco chart), with price lower than both ( buy when 30 or 60 day average below 200, with price below both, blue line below green, with red price below both

This is like buying little nips at a time, buying mini-bottoms. The opposite can be done for distributing….

  •   ( sell when 30 or 60 day average above 200, with price above both, blue line above green, with red price above both ), unless you have a buy and hold forever plan.

https://www.kitco.com/charts/techcharts_gold.html

https://www.kitco.com/charts/techcharts_silver.html

Makes a lot of good points on BTC versus Fiat and bonus material on FTX

Incentives are the strongest force in the world. They explain why good people do awful things, why smart people do stupid things, and why ordinary people do amazing things. Nearly everyone underestimates how much their own beliefs and actions are influenced by their incentives, many of which are designed to fulfill someone else’s goals. – Morgan Housel

For a 21 year old, he gets it. He seems to have a grasp on monetary policy, gold to fiat history and the place that Bitcoin has in the world and it’s future. Plus he has the guy in the middle frame speechless the whole time, not sure if that’s good or bad but, interesting as I kept waiting to see if he was going to jump in the conversation at some point.

 

Additional thoughts on FTX

Incentives for fraud

The FTX implosion looks to be likely fraud or some kind of massive oversight and/or just some bad incentives. With the wrong incentives people can just plain behave badly. Morgan Housel has a short blog post on incentives that covers this topic better than I can here. But, basically once you create incentives that are tempting, too tempting, people can behave badly. People that normally would not steal or commit fraud start to bargain with themselves and wind up slowly dipping into bad behavior, if they don’t get caught, it keeps going. There are many cases of embezzlement that start as innocent “borrowing” from petty cash. Once no one notices that the cash is going out and not coming back ,over time there is an incentive to dip in more. And then you have these news stories of let’s say, because I remember this happening in a town near where I live, I’ll go with this following. Example: You have a town clerk that gets busted for being on the take to the tune of $30K, it all started slowly with small dips and grows to a big number.

Misjudgement and/or Incompetence

Or is FTX/Alameda more about a big misjudgement or incompetence. After all there are precedents for this. Smart people losing boat loads of money as they have not counted on some kind of fat tail event happening. This even occurred with Nobel Prize winners, freshly minted in 1997, Myron Shoales ( Of the Black-Scholes option pricing formula fame ) and Robert Merton ( also part of the  the same famous formula as a contributor ) when in 1998 John Merriweather’s LTCM, Long Term Capital Management imploded as they were seriously over-betting. They were heavily leveraged at the time, which is OK to a point, but they didn’t diversify enough so when things went wrong, the leverage actually went up, when they should have manually dialed it down. What happened at the time was that in 1998 Russia defaulted on it’s debt which LTCM was invested in but they also were invested in the same way with other foreign debt. Well, once one country defaults, it casts a shadow on the rest of the foreign debt as people start to get a bit paranoid as to who might default next. So if you are LTCM and you have a bunch of positions in this same kind of sovereign bonds all over the world, you are certainly not diversified  enough ( they might have thought this all sovereign bond debt was uncorrelated somehow, that bonds would never fall in unison) and if this chunk is a big part of your portfolio and it tanks guess what, bad news fast.

Death Spiral

With LTCM and others,  you get a situation where you have to liquidate something before a margin call happens, usally it’s good stuff that you might want to hold otherwise. This can depress prices of those assets. Soon a firm can get in a situation where the best description would be a reverse hedge and the losses mount on both sides of the trade. With leverage, large leverage 30,60X, it quickly consumes the real capital available. If you try to ask for more capital at this point, nervous lenders may sense panic and then the gig is up. Once lending banks or any other credit line smells something ‘funny’ in the air, panic calls for more capital, through price movements, insider info, whatever, they and other competitors will start to work against a firm like LTCM. They can trade against it and bleed it dry even faster, or they might start dumping the same assets pushing price down more and dry up any liquidity for a firm like LTCM to sell into. Then the problem grows so big that Fed has an emergency meeting and either puts other banks up to the challenge, the creditors, to carve up the carcass and potentially hold the assets until a better time to unload, or worst of all like in Lehman Brothers and etc, the taxpayer gets the bill, or QE happens, which generates inflation, just another tax.

LTCM could have taken the market down much like what happened 10 years later. A excellent course on how the economic collapse of 2008 played out is available at Khan Academy for free as all the material there is, Current Economics

Something like this could have happened at FTX, to much leverage and some fraud with users money, over-betting on the market as it was going into a down-cycle and they couldn’t get out of the dive. If this was a bull market, this kind of stunt might have worked out. Worst of all seems like they used their own FTT token as collateral. It seems like a real conflict of interest, if not just a bad idea as you have created what could be best described as a type of recursive risk. A risk that becomes riskier and you take on more risk. A few more anecdotes from LTCM thanks to one of my favorite books, William Poundstone’s Fortune’s Formula….

  • LTCM lost $4.4B from it’s peak, the partners aloe had dropped about $1.8B. The entire fund had shriveled to $28M in weeks.
  • Robert Merton (1997 Nobel Prize Winner) lost as much as $100M.
  • Larry Hilibrand took out a $24M loan to increase his stake in the fund, leverage on top of leverage. His net worth went from $100M to $20M in debt thanks to the loan. He requested a bailout from the banks carving up LTCM known as the consortium, they said no.

More Interesting FTX Reads

https://www.coindesk.com/layer2/2022/12/02/sam-bankman-frieds-self-incrimination-tour/

https://www.coindesk.com/layer2/2022/11/30/ftxs-collapse-was-a-crime-not-an-accident/

FTX Contagion Slowly Being Revealed

A good interview on this FTX issue is one between C.J Wilson and Josh Olszewicz. It’s well worth seeing them pick this FTX issue apart further.