## Curve Finance Part 2: Swapping Tokens

This post explores the dynamics of the StableSwap invariant when swapping tokens.

## Curve Finance Part 1: The StableSwap Invariant

This post is the first in a multipart series exploring the mathematics behind Curve Finance stable pools. We will begin by introducing the StableSwap invariant and discuss some of the mathematics behind its construction.

## Derivation of Uniswap V2 Marginal Price

The marginal price for a Uniswap V2 (constant product) style AMM is typically quoted without working through the mathematical deriviation. In this post I work through the derivation of the marginal price formula.

## Hyperparameter Tuning with hyperopt in Python

Hyperparameter tuning is an important step for maximizing the performance of a model. Several Python packages have been developed specifically for this purpose. Scikit-learn provides a few options, GridSearchCV and RandomizedSearchCV being two of the more popular options. Outside of scikit-learn, the Optunity, Spearmint and hyperopt packages are all designed for optimization. In this post, I will focus on the hyperopt package which provides algorithms that are able to outperform randomized search and can find results comparable to a grid search while fitting substantially less models.

## A Matlab Cheat Sheet

While I was a teaching assistant for an undergraduate numerical analysis course, I developed this two-page Matlab cheatsheet. It covers basic programming concepts in Matlab and provides an example on generating a plot. This cheatsheet is a valuable resource when first learning Matlab.

## Bohemian Eigenvalues

Bohemian eigenvalues are the distribution of the eigenvalues of a random matrix. More specifically, this article explores matrices of low dimension (typically no larger than 10 x 10) whose entries are integers of bounded height. The name “Bohemian” is intended as a mnemonic and is derived from “Bounded Height Integer Matrix Eigenvalues” (BHIME). Here I present an overview of some preliminary results arising from this project.

## Publication Quality Plots with Matlab

Matlab provides a powerful plotting interface. Unfortunately, the default settings do not produce the most visually appealing figures. Unlike other popular plotting libraries (ggplot2, matplotlib, highcharts, Plotly, etc.), Matlab has no simple method for changing the overall appearance of a plot. One option is to use a platform such as Plotly within Matlab. In this article I discuss how you can improve the appearance of the native plotting architecture within Matlab to give your figures a more professional, refined look.