# Example from "Economics of Money and Banking, Part Two", # Lecture 20-4 "What is a Credit Default Swap" require 'balancesheet' Buyer = BalanceSheet.new("Buyer of Insurance","Long Swap","Short credit risk") Buyer['assets'].push('Corporate Bond') Buyer['liabilities'].push(' ') Buyer['assets'].push('[Treasury Bond') Buyer['liabilities'].push('Corporate Bond]') Buyer['assets'].push('[Tbill') Buyer['liabilities'].push('Tbond]') Buyer['assets'].push('CDS') Buyer['liabilities'].push(' ') Buyer['assets'].push('IRS') Buyer['liabilities'].push(' ') Buyer.draw Seller = BalanceSheet.new("Seller of Insurance", "Short swap", "Long credit risk") Seller['assets'].push('[Corporate Bond') Seller['liabilities'].push('Treasury Bond]') Seller['assets'].push('[Tbond') Seller['liabilities'].push('Tbill]') Seller['assets'].push(' ') Seller['liabilities'].push('CDS') Seller['assets'].push(' ') Seller['liabilities'].push('IRS') Seller.draw