## Complex Derivative Field

There is a direct analogy relating the real and imaginary components of the complex derivative to divergence and curl (respectively) of a 2D vector field. Let be a complex-differentiable complex function and be the corresponding 2D vector field: Complex Number Surface Vector Field (note) So (note) Here curl is […]

## Plus in Other Domains

There is a class of multivariate functions that have some kind of “univariate character” except that they “combine effects”. A+B is king of them. Some of his subordinates are: 1. 2. 3. These expressions are all commonly used. Number 3 is so common that it has it’s own shorthand: . Let’s define a family of […]

## Multilinear Interpolation

There is a neat visualization of linear interpolation that generalizes to higher-dimensional spaces, including bilinear (2D) interpolation, trilinear (3D) interpolation and general multilinear interpolation. At all levels it is much easier to remember the visualization than the formulas directly. Let’s start with the simplest case… Linear Interpolation Linear interpolation is a weighted average of 2 […]

## Zeno Bouncing

If you drop a rigid ball onto a rigid surface, it eventually stops bouncing without ever bouncing the last time! This is called Zeno behavior, after Zeno’s most famous paradox (Achilles and the tortoise). Suppose we drop the ball from a height of 1m, and the coefficient of restitution is 0.9. So every bounce is […]

## CircularArrayList for Java

Java applications sometimes need a “sliding window” view on a stream/sequence of data. This can be provided by a List with fast element insertion and removal at opposite ends (like a queue) fast access to random elements in the list (like an array) Unfortunately, no existing implementation of the List interface in the Java Collections […]

## Serial Port ARQ App

Here is a small command-line tool for transporting small files (up to 1MB) over an unreliable serial link. Internally, it uses a flexible automatic repeat request (ARQ) protocol to maximize efficiency while guaranteeing reliable transfer over a serial link of unspecified reliability and latency. (It was originally used to transfer pictures between military radios.) The […]

## Some AVR Libraries

Here are a few commonly useful source code libraries intended to serve as hardware abstracting modules or general purpose modules for AVR microcontroller applications compiled with GCC. They are not guaranteed to be fit for any particular purpose, but I have used them over the years on a number of projects on ATmega32, ATmega64 and […]

## Profitability and Information

In the previous post (Optimal Market Exposure), we saw how trading requires information superior to the “outside world’s belief”, in order to be profitable. The trader may obtain this information by analyzing market fundamentals or technicals, or both. It is actually obvious that better information facilitates better trading, and more profits, but here we will […]

## Optimal Market Exposure

Having established in the previous post (Logarithmic Utility of Wealth) that the utility of a rational, small, long-term trader’s account is logarithmic in the account’s size, we are in a position to mathematically optimize how much risk (exposure) the trader should take on a given opportunity. We do this simply by maximizing expected utility with […]

## Logarithmic Wealth Utility

The previous post (Utility Function of Wealth) discussed and described the typical general shape of the utility function of wealth, and touched on some applications. Here, we will consider a special case, with an exact curve. Consider a rational trader – a trader that is emotionally detached from his account, and whose objective is to […]