Note that there are some explanatory texts on larger screens.

plurals
  1. POCombining time-series objects and lists: Package "termstrc"
    primarykey
    data
    text
    <p>The R package "termstrc", designed for term-structure estimation, is an incredibly useful tool, but it requires data to be set in a particularly awkward format: lists within lists.</p> <p><strong>Question</strong>: What is the best way to prepare and shape data, either outside R or inside R, in order to create the repeated sublist format required to run the function "dyncouponbonds"?</p> <p>The "dyncouponbonds" command requires data to be set in a repeated sublist, whereby a list of bonds and time-invariant features of those bonds (let's call this "bondlist"), is appended with some time t features of those bonds (price and accrued interest), and replicated for time t+1 to T. </p> <p>Below is an example of the list format for one period. The "dyncouponbonds" command requires this format to be replicated, within an umbrella list, for all T periods. ISIN, MATURITYDATE, ISSUEDATE, COUPONRATE will be identical for each period. PRICE, ACCRUED, CASHFLOWS and TODAY will be different for each period. </p> <pre><code>R&gt; str(govbonds$GERMANY) List of 8 $ ISIN : chr [1:52] "DE0001141414" "DE0001137131" "DE0001141422" ... $ MATURITYDATE:Class 'Date' num [1:52] 13924 13952 13980 14043 ... $ ISSUEDATE :Class 'Date' num [1:52] 11913 13215 12153 13298 ... $ COUPONRATE : num [1:52] 0.0425 0.03 0.03 0.0325 ... $ PRICE : num [1:52] 100 99.9 99.8 99.8 ... $ ACCRUED : num [1:52] 4.09 2.66 2.43 2.07 ... $ CASHFLOWS :List of 3 ..$ ISIN: chr [1:384] "DE0001141414" "DE0001137131" "DE0001141422" ... ..$ CF : num [1:384] 104 103 103 103 ... ..$ DATE:Class 'Date' num [1:384] 13924 13952 13980 14043 ... $ TODAY :Class 'Date' num 13908 </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload