Monthly Archives: January 2024

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