Skip to content

Instantly share code, notes, and snippets.

<!doctype html>
<html lang="">
<head>
{# <script src="/static/js/htmx-1.8.0.js"></script> #}
<script src="https://unpkg.com/htmx.org@2.0.4/dist/htmx.min.js"></script>
</head>
<body>

Investor purchases $100 in treasury securities

Central Banking 101 by Joseph Wang has the following example on page 26:

image

So an investor purchases $100 of treasury securities from the treasury. I'd like to focus on that part of the example.

I've highlighted the relevant parts of the balance sheets here:

A-1d.pkl
AAPY-1d.pkl
AAT-1d.pkl
AB-1d.pkl
ABVE-1d.pkl
ACIO-1d.pkl
ACNB-1d.pkl
ACV-1d.pkl
ACVF-1d.pkl
ACWI-1d.pkl
ACRS-1d.pkl
ADCT-1d.pkl
ANIX-1d.pkl
AOMR-1d.pkl
APLD-1d.pkl
APLY-1d.pkl
ASRV-1d.pkl
AVO-1d.pkl
BAX-1d.pkl
BCOV-1d.pkl
import pandas as pd
import treasury_gov_pandas
import streamlit as st
import plotly
import plotly.express
# @st.cache_data
def get_dataframe():
return treasury_gov_pandas.load_records('https://api.fiscaldata.treasury.gov/services/api/fiscal_service/v1/accounting/od/auctions_query', lookback=10, update=False)
import io
import requests
import pandas as pd
def trade_quote(symbol, expiration, date):
url = "http://127.0.0.1:25510/v2/bulk_hist/option/trade_quote"
querystring = { "root": symbol, "exp": expiration, "start_date": date, "end_date": date, "use_csv":"true" }
import pandas as pd
import treasury_gov_pandas.datasets.mts.mts_table_4.load
import streamlit as st
import plotly.express as px
import numpy as np
df = treasury_gov_pandas.datasets.mts.mts_table_4.load.load()
# convert null values to 0 in the column 'current_month_net_rcpt_amt'
import os
import glob
import pandas as pd
from bokeh.plotting import figure, show
from bokeh.models import ColumnDataSource, HoverTool
from bokeh.transform import linear_cmap
from bokeh.palettes import Viridis256
from bokeh.io import output_notebook
from bokeh.plotting import figure, show
import bokeh.models
import bokeh.palettes
import bokeh.transform
import pandas as pd
from bokeh.plotting import figure, show
import bokeh.models
import bokeh.palettes
import bokeh.transform
import pandas as pd