
Switching from iTerm2 to Ghostty
I've been using iTerm2 for years, but recently switched to Ghostty — and I'm not going back...

Switching from iTerm2 to Ghostty
I've been using iTerm2 for years, but recently switched to Ghostty — and I'm not going back...

Using asyncio and WebSocket to Retrieve and Record Binance K-Line Market Data
As we know, Binance offers two methods to obtain K-line data: REST API and WebSocket. Among these, WebSocket is the preferred method recommended by Binance for obtaining real-time data. This guide will show you how to use Python asyncio to subscribe to Binance K-line data via WebSocket, and asynchronously record Binance K-line market data as Pandas DataFrame in Parquet format.Connecting to Binance Market Data WebSocketTo get market data via WebSocket, we first need to implement a robust WebSo...

Using asyncio and WebSocket to Retrieve and Record Binance K-Line Market Data
As we know, Binance offers two methods to obtain K-line data: REST API and WebSocket. Among these, WebSocket is the preferred method recommended by Binance for obtaining real-time data. This guide will show you how to use Python asyncio to subscribe to Binance K-line data via WebSocket, and asynchronously record Binance K-line market data as Pandas DataFrame in Parquet format.Connecting to Binance Market Data WebSocketTo get market data via WebSocket, we first need to implement a robust WebSo...

Notes: How the Economic Machine Works
This article summarizes Ray Dalio’s video How The Economic Machine Works The economy operates like a simple machine, yet many people are unaware or disagree with this perspective, leading to unnecessary economic losses. Here is an analysis framework that may not perfectly align with traditional economics but is highly useful:The economy appears complex but functions in a straightforward and mechanical way.It is composed of a few simple parts and countless simple transactions, driven by human ...

Notes: How the Economic Machine Works
This article summarizes Ray Dalio’s video How The Economic Machine Works The economy operates like a simple machine, yet many people are unaware or disagree with this perspective, leading to unnecessary economic losses. Here is an analysis framework that may not perfectly align with traditional economics but is highly useful:The economy appears complex but functions in a straightforward and mechanical way.It is composed of a few simple parts and countless simple transactions, driven by human ...

AROON Technical Indicator Implementation and Optimization
AROON Technical Indicator Implementation and Optimization: Accelerating the rolling argmax Operator by 1500x using Numba and Monotonic Queue AROON is a common technical indicator, whose definition can be found at Investopedia. The challenge in implementing this indicator lies in the rolling argmax operator, for which pandas does not provide an official implementation. A naive implementation based on Series results in considerably slow computations. Optimizing the computation of this indicator...

AROON Technical Indicator Implementation and Optimization
AROON Technical Indicator Implementation and Optimization: Accelerating the rolling argmax Operator by 1500x using Numba and Monotonic Queue AROON is a common technical indicator, whose definition can be found at Investopedia. The challenge in implementing this indicator lies in the rolling argmax operator, for which pandas does not provide an official implementation. A naive implementation based on Series results in considerably slow computations. Optimizing the computation of this indicator...

How to install Ta-lib in Python Anaconda environment
TA-Lib is a widely utilized library for technical analysis in quantitative trend-following strategies. The installation process for TA-Lib can be quite challenging, leading users to spend a significant amount of time on setup. In this article, we will discuss a straightforward method for installing TA-Lib within the Python Anaconda environment as of today (2023–06–23). For all 64-bit operating systems, including Windows, Linux, and macOS (Arm64 M1-M3 CPUs are supported), installation can be c...

How to install Ta-lib in Python Anaconda environment
TA-Lib is a widely utilized library for technical analysis in quantitative trend-following strategies. The installation process for TA-Lib can be quite challenging, leading users to spend a significant amount of time on setup. In this article, we will discuss a straightforward method for installing TA-Lib within the Python Anaconda environment as of today (2023–06–23). For all 64-bit operating systems, including Windows, Linux, and macOS (Arm64 M1-M3 CPUs are supported), installation can be c...