Reflections on Caps and Floors Automation Goal of the Article In this document, I present possible ways to automate collection of caps and floors price data using Bloomberg terminal and Microsoft Excel. I show that, without further subscription to Bloomberg service, all these methods will fail in collecting the data we want. Motivation Automating the process of collecting caps and floors prices offers several advantages. First, it significantly reduces the time we spend on collecting the data manually, which is even more beneficial if we want to further collect the 0.5% incremental prices. Second, it offers more continuous daily prices, rather than the discrete weekly prices we have now. Third, with the automatically collected price data, we can rebuild our risk-neutral density model on these automatically updated data so that for each historical trading date, the risk-neutral density is calculated automatically. Possible Solutions and Why They Are Failed 1. Bloomberg Excel Add-in Functions Bloomberg offers Excel add-in functions to enable subscribers to access data directly from Excel. There are three commonly used functions, BDP, BDH, and BDS. BDP function helps collect single data point of current or real-time data for a selected security; BDH helps collect historical data for a given security; and BDS function helps collect multi-cell descriptive data for a selected security. In our caps-and-floors case, the BDH function cannot be used, because what we want are the rolling prices of daily updated new caps and floors, which the BDH function cannot identify (it can only identify historical price data for a given security, while in our case, we need to price a new security for every trading date). The BDS function cannot be adopted either, because it is designed for collecting descriptive data, like the company’s address. Therefore, the BDP function is our only possible choice. In fact, the BDP function can extract single price data for a specific cap or floor. For example, if we want to collect the price of a 2-year USD cap with 1% of strike that starts on 05/29/2020, we can do it in the following way: Step 1: Specify the environment in Bloomberg. Step 2: Save the deal to get a specific security id. Step 3: Use Excel BDP function to get the premium of this cap. The formula is = BDP("SLQE23HG Corp", "SW_PREMIUM", "SETTLE_DT = 20200529", "SW_CURVE_DT = 20200529") In fact, we can also get the historical data of this security by changing the curve date and the valuation date in the above formula. For example, if we want to collect historical price data of this security from 05/29/2020 to 06/01/2020, we can do this as following: However, this formula only gives correct price for 05/29/2020, because for each date after 05/29/2020, this formula still offers prices for the security that starts on 05/29/2020, while what we want is actally the price of a new cap that starts on 05/30/2020, 05/31/2020, and 06/01/2020. Unfortunately, the BDP function does not allow us to change the effective date (“SW_EFF_DT”) and the maturity date (“MATURITY”), despite that we can type them in the formula. This is because, once the deal is saved, the effective date and the maturity date are locked. Therefore, we cannot change them unless we set the “new” environment in Bloomberg and save the “new” deal. Generally speaking, we cannot automate the data collection using Execl’s existing Bloomberg add-in functions. 2. Existing Interest Rate Cap/Floor Securities Using Excel add-in functions fails to collect prices of caps and floors because we need to “create” a security for every trading date. If there are interest rate caps and floors that have certain characteristics such as denominating currency (USD, EUR, or GBP), maturity (2-year, 3year, etc.), and strike price (1%, 2%, etc.), we can quote that security id in Excel using BDP function to get the prices of caps and floors we want. In fact, these securities do exist. The following lists contain such securities for USD denominated caps: Specifically, the USD cap with id “USON002 BGN Curncy” has the following characteristics: Since the settlement date rolls forward, this security is exactly the rolling 2-year cap with strike of 0% for the 3-month LIBOR. By using BDH function, we can get the historical prices for the rolling caps with characteristics of 2-year maturity and 0% strike price. Since there are other securities that span the maturity from 1-year to 10-year and strike prices from 0% to 10% (with 0.5% increment), we can use these securities to automate our search for specific caps and floors prices. However, these interest rate caps and floors are not quoted, meaning that we cannot extract historical prices of them. 3. Bloomberg Swap Toolkit The last option we have is to use the Bloomberg Swap Toolkit. The Bloomberg Swap Toolkit enables us to price everyday a new interest rate cap/floor that rolling the effective and maturity dates. The BPRICE function generates valuation data that change when interest rate markets move. Unfortunately, this product requires premium subscription, which we now do not have. 4. Requesting Historical Data Using Programming Language Bloomberg Developer Guide provides programming templates (C++ and Java) that help request historical data for a set of securities and fields over a specified period. However, the programming templates still use definitions that are built by Bloomberg back desk, which can only be obtained by accessing to the Bloomberg API Libraries. Unfortunately, the swaps library also needs preimum subscription. Conclusion Without further subscription to the Bloomberg Swap Toolkit or the Bloomberg Swap Library, we cannot automate our collection of the prices for the rolling caps and floors. Acknoledgement I want to thank Giovanna, Max, Barney, Aishwarya in Bloomberg Fixed Income Team for patiently answering my questions. I want to thank my friend Cheng Tang from Duke’s MS in Computer Science program for trying to use C++ to crawling data from Bloomberg and pointing that we do not have access to the Bloomberg swaps database.