A New Chapter: Graduation and a New Role at Monark
I’m thrilled to make two major announcements: I have completed my Master’s in Financial Engineering from Stevens Institute of Technology, and I am starting a new role at Monark…
Essays and commentary on software, finance, economics, and policy.
Showing 36 pieces.
Try another search or clear the filters to browse writing.
I’m thrilled to make two major announcements: I have completed my Master’s in Financial Engineering from Stevens Institute of Technology, and I am starting a new role at Monark…
The December Fed meeting is today! Despite the worrying lack of data, the market is confident that rates will be cut by 25 bps, with the FedWatch tool giving a 87.6% chance for a…
Federal Housing Finance Agency director Bill Pulte recently floated a big potential change to the mortgage market: 50 year mortgages. Unfortunately, these aren’t realistic.…
“Jefferies Fund Has $715 Million in First Brands Group, LLC’ Trade Debt”… but what does that exactly mean? This Bloomberg headline is causing market turmoil about Jefferies, but…
Interest rate cuts won’t relieve a labor supply shock: with lessons from energy and housing crises. After today’s stunning job revision of −911,000 jobs for March 2025, the stock…
Great video about oil prices from experts in commodities. I think Wasif Latif’s point about the price being right for oil is really significant for the implications of the energy…
Neural networks AREN’T impressive… in the context of data analysis, by themselves. With the explosion in discourse about AI, traditional neural networks have also gained cultural…
I found this article on structured errors insightful. Although it is focused on Rust, the explanations of the direct benefits of encoding information about the failure surface of…
Rust’s subsecond crate is a game changer for application and game development in Rust! Its innovative hotpatching method enables hot reloading for select libraries. By far the…
Moody’s has downgraded the US’s credit rating from the best (Aaa) to second-best (Aa1), sending the markets into a buzz. But what does it mean to downgrade a credit rating? All…
Rust turns 10! In honor of this momentous anniversary, I’d like to reflect on what Rust means to me, and why I have followed it for so long. I first heard about Rust in 2021,…
Ending early today because the Pacers are playing tonight Generally speaking, the Basel 2 , Basel 3, and current Basel 3.5, all these rules and regulations require that banks…
The syllabus records “Risk Weighted Assets: Counterparty RWAs. Calculation and modeling,” taught by Juan. The personal course export contains the scheduled topic but no worked…
This is going to be a basic introduction, this is a complex topic to cover comprehensively. The Gaussian latent-variable framework and conditional-independence construction are…
This is an idea that was created in the 50s, exploded in the 90s, where it was called neural networks. A lot of development on the brain happened, so ANN was a term to…
The syllabus records “Introduction to X-VAs: CVA/FVA,” taught by Yee Han. The personal course export has the topic and date, but no worked XVA lecture notes. The former CVA/FVA…
Trump is threatening the independence of the Federal Reserve. But why does this even matter? And what does the Fed even do? The role of central banks in the economy is a…
Lecture notes on minimum, independent, and maximum dependence in a one-factor credit model.
We will expand on the variance reduction techniques, we will repeat a couple things from last week. But before we do that, we should talk about Euler Milstein or Euler Maruyama.…
The biggest loser of the tariffs, the tragedy of the “miracle on the Mekong”: Vietnam 🇻🇳 When President Trump revealed the list of tariffs on “Liberation Day”, one country stood…
I rewatched The Big Short last night, and realized that they sensationalized a pretty boring reason that the 2008 crisis happened. When the housing bubble burst and the Great…
Trump’s policy of reducing the national debt through an export-driven economy has parallels to 1980s Romania—and it doesn’t end well. President Nicolae Ceaușescu was elected to…
An old Chinese proverb contains the key to understanding their tariff strategy: 打得一拳开 免得百拳来 “throw out one punch now to avoid a hundred punches in the future” What does it mean?…
Last day of class is Thursday, May 8. The final exam is going to be posted then, take-home exam. It’ll be posted like an assignment. Will be posted in evening around 6:30, you’ll…
The secret plan behind crashing the economy—and why it can’t work 😴 The anticipation of and uncertainty around Trump’s tariffs have caused the stock market to plunge rapidly…
We will cover this stuff in two different lectures. Today is Monte Carlo 1. The two theorems are the basis of the entire Monte Carlo simulation. The Law of Large Numbers (LLN)
Misinformation becomes especially dangerous in volatile markets… 😱 After President Trump’s tariff announcement on “Liberation Day” last Wednesday, markets have roiled. The…
Documentation is the key to vibe coding success! The use of LLM AI code assistants (or “copilots”) like Github Copilot and Claude has exploded recently. Many non-programmers have…
Rust 1.86.0 has been released, with a very nice ergonomic feature to get around the borrow checker: get_disjoint_mut Rust’s borrow checker is the heart of its promise of memory…
We discussed the mechanics of CDS a bit, and then started on the valuation. So let’s discuss the valuation in more details. We have two legs. The premium leg is the buyer, who…
Parameter estimation for stochastic differential equations. investments by the West after dictator Ceaușescu failed to invade Czech republic he stopped imports and increased…
The syllabus records “Introduction to Credit: Credit Default Swaps; relationship to Bonds; Credit as a traded asset class,” taught by Yee Han. The personal course export contains…
New AI images stun the world 🤯 but are they worth the cost? 🤔 AI images have flooded social media seemingly overnight, with the specific trend of “Ghiblization” (transforming…
Λ , the hazard rate, is convenient to work with. If we integrate over it, we can get the survival probability 𝑉 ( 𝑡 ) at time 𝑡 . We can also get the probability of default 𝑄 ( 𝑡…
Handwritten midterm reference for quadrature and Black-Scholes notation; several formulas are unclear in the source render.
The syllabus records “Risk Management: GARCH — Statistics.” The personal course export contains the schedule and the workbook implementation notes for the Black–Scholes/FX…
The LIBOR Market Model (or Brace-Gatarek-Musiela Model ) is a model constructed in terms of the forward rates underlying caplet prices. HJM was defined as a process for the…
Theoretical transformations, very technical How do you solve a Heston model using Fourier transforms? The very first stochastic volatility model introduced is the Hull-White model.
We’ll look specifically at Vasicek and CIR. Then we will make some remarks on the Hull-White two factor model, then some more complex model. The code for this in a package in R.…
Cubic Splines, you solve something that is like a tridiagonal system Artificial Neural Network multilayer perceptron… the whole point of this is that you can exercise this at any…
The syllabus records “Black-Scholes shortcomings: smile effects.” The source export contains the volatility-surface helper below and explicitly labels it “Vol Surface Functions —…
This will be focused on numerical methods, next week we will have more examples. What is the difference between interest rate risk and stock price risk? One of the most important…
Don’t use AI, you won’t learn anything. And it’s not really intelligent, it just takes things from the Internet. There are two different general finite difference schemes, which…
A handwritten finite-difference sketch with A/B/C labels; surrounding equation notation is unclear in the source render.
The syllabus labels this class “Black-Scholes shortcomings: discrete hedging; volatility uncertainty.” The source workbook expresses the risk measures as functions. It does not…
Timing and quanto adjustments, we also looked at nonstandard swaps, LIBOR for LES? Another kind of nonstandard swap is… The definition of a CMS is an interest rate swap where the…
Finite difference methods to approximate PDEs this week Next week we will continue this and do a little bit more complicated stuff. Homework is due right before spring break.
The syllabus calls this class “Introduction to Black-Scholes. BS usage for a practitioner. First and Second order risks. Xgamma. Intuitive awareness.” The source notes are the…
We may have to make some adjustments when we value interest rate derivatives. These are convexity, timing, and quant adjustments. We will see when it is appropriate to make these…
Trump has taken aim at pharmacy benefit managers, and the response from the industry seems to be… duck and cover. Prem Shah, executive VP at CVS, responded to skepticism on…
I posted an assignment, this assignment is due this week on Sunday. Let’s just talk about the homework. This covers material from first two lectures. This lecture and previous…
We’re going to look at bond options, caps and floors, and everything about swaptions. Depending on time, we may go forward. Basically these are instruments whose payoff is…
We’re not going to use the arbitrage method, we are going to use the forest methods. You all understand the stochastic process. Fundamentally, it starts from a point 𝑆 0 , and…
The syllabus records this class as “Stochastic Processes — Intro to FX: FX parity; Spot and Forward trading; FX conventions.” The source document does not contain a prose…
We started to look at interest rates. In the first part we’re going to discuss various interpolation methods, functions that are useful for modeling the yield curve. That’s…
Hanlon 2 is occupied by the system administrator, Zheng Xing. He will move his class so that we can occupy there. They will need to remote desktop into the lab. I should have…
Take-home exam format, 24/48 hours, lots of writing code, during finals week. If a company wants money, it has options. It can issue stock, get a bank loan, or issue a bond. What…
As a frequent user of public transit, I know how impactful delays are both on my productivity and my mental health. Being stuck in Secaucus Junction because of some nonsense…
I’m out on vacation this week, so I watched the recording A stochastic processes is merely a collection of indexed random variables. The indexing of these variables confers a…
A new version of the Rust language has been released: Rust 1.84.0! Although there aren’t any new language features, this release kickstarts three big infrastructure improvements…
This is the last lecture we have for this class. Next week will be a review session. Exam will be online . December 21, We’re going to be pricing exotic options. We are focusing…
The straddle strategy is owning a call and put option with the same characteristics. If I end up long a call option and short a put, it ends up being a forward contract. I can…
A recent RFC (request for comment) for the Rust language has divided the community: default fields in structs. In order to implement a default version of a struct in Rust, one…
Notes added to lab 4 and discussion which delves into the analytic part establishing the connection between the two. Futures are less flexible because they are standardized, and…
A happy Thanksgiving to all! Today, in addition to my loved ones, I’m grateful for a brand-new version of Rust, now with more const ! const evaluation is one of the most…
in-class final will be decided by Thanksgiving All of the stuff we learned about stochastic calculus has been organized around the Ito process, which is continuous. We’re going…
Let’s say I’m trading futures. What is the log return of this? The futures contract at time 1 is worth 𝑆 0 𝑒 𝑟 , then at time 2 is 𝑆 0 𝑒 2 𝑟 , etc. If you look at log returns,…
Came late because my brother couldn’t get up 🙁 where 𝛽 is the drift and 𝛾 is the diffusion. Diffeqs always need a boundary condition, given by
The Girsanov states that The norm of a process is the Euclidean Norm: ∥ Θ ( 𝑡 ) ∥ = ∑ 𝑗 = 1 𝑑 Θ 𝑗 2 ( 𝑡 ) And so the square of the norm is just that.
We’re going to continue derivatives, uninteresting because I’m taking 620. Then we will start linear risk, more interesting. A financial engineer is someone who doesn’t know…
Keep in mind that you can’t separate 𝜖 out from 𝑌 because they are not necessarily independent. We can use the fact that 𝜖 is complementary to divide up what 𝑋 means. But notice…
On problem 2, either you optimize for risk-free or risky assets. The question becomes unconstrained optimization. Either we have the same thing as Exam 1, released on 13 or 19?…
Let’s go into the world of sports gambling. Hypothetically, we’re going to have two teams competing, Team A and Team B. Objectively, Team A is the better team. Let’s say in the…
A brief pause from election-day politics to notice an unexpected rainbow.
Beginning chapter 7, vectors of random variables. We are concerned with a random vector The cdf of this vector is We can also say that if we have a random vector (X, Y) then
The Treynor ratio is intended to capture systematic risk, but doesn’t tell you anything about portfolio returns. Sharpe ratio doesn’t tell you anything about systematic risk. R^2…
Recognize that this is some function that looks like 𝑓 ( 𝑎 , 𝑏 ) , like where 𝑎 is a deterministic component and 𝑏 is a stochastic component. Then solve your partials
Definition 5.4.6 says that the pdf is then X is a Student t-distribution with degrees of freedom 𝑡 𝑛 . Proposition 5.48 will tell us all the moments, which are not easy to prove.
A reflection on President Biden's apology for federal Indian boarding schools.
The Economic Value of Mean Squared Error: Evidence from Portfolio Selection What’s the intuition? Everyone talks about optimization, rational agents doing the best they can. A…
We’re going to be talking about multivariable stochastic calculus. All of this material is fair game for the midterm. Next week is the midterm review session. Bring questions!…
Definition 5.36 says that X is a Chi squared distribution whose pdf is described by This is actually linked to the gamma distribution There is also a remark which says that the…
We will either lend or borrow from a bank at interest rate r. In that scenario, the amount of wealth that i have at maturity time T. My wealth would be the value of my shares and…
We can actually do this from a portfolio perspective, it’s the same idea. We have some weight What’s the variance? 𝕍 [ 𝑍 ] = 𝑤 1 𝜎 1 2 + 𝑤 2 2 𝜎 2 2 + 2 𝑤 1 𝑤 2 𝜎 12 It’s the…
Recall for a discrete random variable. The moment formula is The moment for a continuous rv is the integral All the possibilities are the real line here.
We started with the foundation, risk-reward trade offs, portfolios. Then we moved to quantitative analysis on individual assets. Mostly we have focused on a single game, a single…
This is seemingly one of the simplest integrals you could do. If we’re going to do this integral, how we’re going to do that is to create a process Δ 𝑛 ( 𝑢 ) → 𝑊 ( 𝑢 ) that…
What Minneapolis changed in its zoning rules, and what happened to housing and rents.
We left off last week talking about first passage time. We said that the cdf was Last thing before Stochastic Calculus we should talk about maximum to date . This will be…
An overview of the 2024 CUPS printer-discovery vulnerability and its risk.
The most important properties of Brownian motion are that it is a martingale (the expected value of the process is 0) and it accumulates quadratic variation at a rate of one per…
Under market efficiency, financial prices should exhibit a random walk. Eugene Fama is the big guy behind market efficiency. He was interviewed by the Financial Times ( Open…
A short guide to Rust's compiler pipeline and a backend that targets .NET.
We will be covering discrete random variables this week. A discrete random variable is one whose image 𝑋 ( Ω ) is a finite/countable subset of ℝ . First thing we introduce is the…
(continuing from last time) A stochastic process is a collection of random variables indexed by time. If you start out at time 0 and each time you pick heads you go one step,…
50 bps cut! Markets exploded today. Information gets priced in a nonlinear way Today’s topic will be a little independent of what we’ve done, so it will be more into the…
We can consider a mapping between all of the sets in the 𝜎 -algebra of one measurable space ( Ω , ℱ︀ ) to another sample space Ω 1 , where the mapping is measurable each set has…
A look at the 2018 washing-machine tariffs, consumer costs, and U.S. manufacturing.
Let’s define an infinite probability space Ω ∞ . This sample space is uncountably infinite, which means that the probability of any particular outcome is zero. Therefore, in…
Let’s say we want to invest in long-term U.S. government bonds. The monthly average return of this is 0.47%, half of the equity market, and 2.3% standard deviation, less than…
Bill Smead compares current enthusiasm for AI with the dot-com era's Cisco boom.
We have already considered the measurable space ( Ω , ℱ︀ ) of the sample space and 𝜎 -algebra. We can now define the probability measure ℙ as a measure defined on events in the 𝜎…
A response to Scott Bessent's arguments about tariffs, inflation, and fiscal policy.
Financial risk management involves identifying, assessing, measuring, and managing financial risks. Some risks are measurable, others are not. Risk cannot always be avoided, but…
The purpose of probability is to obtain answers about real-life phenomena which do not have a predetermined outcome. We need a mathematical model to describe this so that we can…
A summary of the 2024 bill's price-gouging language, defenses, and penalties.
Floating point numbers are complicated enough in the abstract. How do systems programmers and hardware designers cope with the complexity of floating point? In the general…
IEEE-754 is the standard for floating point computation around the world. Thus, any real-world discussion of floating point must include it. IEEE-754 floating point numbers are…
Floating point representation is a complex topic full of nuance. To understand it, we must focus on the abstract method used to represent non-integer numbers. Math is infinite.…
The internet has taken over the world, but with it have come malicious actors. People want to spy on you, scam you, steal from you, or harm you through the internet. Through…
Python is a powerful jack-of-all-trades language that is much less limited than OCaml. Arithmetic works in a very simple and clear way in Python, basically like a calculator. 2 #…
Persistent storage is essential to every system that we can think of, and we can hardly think of a computer without it. However, managing disks is not as simple as it might…
Tiny particles are affected in different ways than we are by waves. There are several different effects that must be discussed. Many people believe that Albert Einstein won the…
Streaming multimedia is a relatively new concept in internet technology, but now has become central to the daily media consumption of people around the world. In contrast to the…
Conditional statements are very powerful and are in used in almost every language. How does Prolog implement the same idea? The basic idea behind a control statement is that…
Albert Einstein revolutionized the world of physics when he discovered the special theory of relativity. It is only possible due to his contributions that valuable technologies…
Light is curious because it is both a particle and a wave, which makes it behave strangely in certain contexts. When projected through a slit, some strange fringes will appear,…
Through all the layers of the internet, the most essential is the link layer : converting bits to and from signals, detecting errors, flow control, and addressing. We have spoken…
Prolog is a special programming language that is not like many others. It exemplifies the paradigm of logic programming . Functional programming is based on the idea that all…
Concurrency is a powerful tool to increase performance in applications. This is usually accomplished using threads. Clock frequency in CPUs has massively increased over the past…
When a host needs to find the best destination/prefix to another host, what routing algorithm does it use? We can use either intra or inter domain. As you may recall, the routing…
Sometimes we don’t have a lot of memory to access. In those cases, we need a place to put our data. The natural solution is to put data in the disk, which has very high storage.…
Everyone nowadays gets the Internet through the router in their home. But what is a router? It’s likely that you have an internet speed in the tens of Mbps. This unit is megabits…
Mirrors can interact with light in interesting ways. In fact, reflection and refraction are probably most people’s engagement with laws of physics surrounding light in their…
When we discuss the principles of programming languages, lambda calculus is the bedrock of our discussion. It is the most abstract, formal way to describe functions and…
Besides the primary Internet protocols, there are some others to learn about, like DHCP , NAT , IPv6 , etc. What happens if a device doesn’t have a permanent IP address? You take…
We have discussed electric fields and magnetic fields, and the way that they change and interact. The full interaction of these fields will create electromagnetic waves , the…
How does an ISP assign IP addresses to its customers? An ISP has a block of addresses that are partitioned to its customers. If an ISP network has an address like 200.8.4/24…
Making a website in the modern era is not easy to do for free. I did it using Zola, Github Pages, and Github Actions. I’ve always wanted to have a personal website where I can…
Currying is the concept of having multiple arguments in a function. OCaml defaults to currying its functions. int -> int -> int is a function that takes two int s and returns an…
HTTP is probably the most visible Internet protocol to end users. It appears (as well as its cousin, HTTPS ) at the beginning of every URL we use to access the internet. But how…
The main problem that segments have introduced to managing memory space is that their variable size wastes memory through fragmentation. Fixed-size pieces that are easier to…
TCP is the well-known protocol for reliable transfer of data. But how does it actually work? System of handshakes ensures reliable transmission of data. What happens if a packet…
The final piece to the puzzle of electromagnetism here is electromagnetic induction , where we use magnets to create current. Like with charges in a magnetic field, magnets do…
When we make our programs more and more complex, we need more complex data types as well. We have only used OCaml’s built-in data types, how can we construct our own data types?…
What are the formal semantics of how a programming language works, mathematically? That’s a broad topic. Operational semantics , which are how programs execute , are narrow…
Recursion in many languages can cause significant overhead. It might seem that the excess amount of recursion in OCaml would decrease its performance. But it actually doesn’t,…
The simplest transport protocol that is used communicate between sockets is known as UDP , the User Datagram Protocol . Let’s say we want to design the simplest transport…
The question of how magnets work has long puzzled many . We will endeavor to answer all of those questions today. Magnets work similarly to electric charges where like poles…
Email is the most popular way in the world to send large messages. This is a complicated process which requires its own protocol: SMTP . The Simple Mail Transfer Protocol is how…
We can do a lot of cool things with functions besides calling them in OCaml. Values are a subset of expressions, as previously stated. All expressions can evaluate to values, but…
Before we had Google Drive, users needed a way to access files from other people quickly and easily. The method for that was FTP . The point of the File Transfer Protocol , was,…
Accessing physical memory can cause big issues if we do it directly. How can we virtualize the memory like the CPU so we can use it efficiently and safely? Let’s think of a super…
Lists are the most basic data structure in OCaml, but there are others that we need to be aware of. We have seen the keyword let used to define expressions and store values.…
Circuits are the method by which all electricity travels throughout the world and power every single device in existence. It is therefore crucial to understand them while…
We need protocols to define the way that messages are interpreted. Messages are different based on what kind of information you are sending. For example, HTTP (HyperText…
How do we get the best performance in sending information over the internet? What is packet switching and how can it help? Performance is bottlenecked by propagation delay and…
The way that the operating system decides which processes to run and when is a complicated process known as scheduling . This is how it works. We should understand a few…
Lists are the most basic data structure in OCaml. The most analogous structure is a vector in C++ or Rust. Lists are homogeneous and of arbitrary length . The most basic list is…
Besides electrical charge and field, there’s another force that is relevant to electricity: electric potential . Gravity is similar to the electrostatic force, apart from the…
A function takes arguments, performs operations using them, and returns a value. In OCaml, we can write functions like so let rec fact n = (* the function is named fact and its…
What is electricity, and how does it work? Fundamentally, the negative charge comes from the electron , a subatomic particle. The positive charge comes from protons , also in the…
We need a way to map on to the physical CPU through our operating system. We do this through virtualization. A process is an execution stream in the context of a process state.…