Stefan Angrick

Analysts typically look at bond yields as time series (tracking yield changes over time) or across different maturities (chaining interest rates on different contract lengths to form the yield curve for any given date). The St. Louis Fed's FRED database provides the relevant data on US Treasury Bonds and US Treasury Bills, making it easy to analyse bond returns in either of these ways. But sometimes you want to look at both dimensions together. In those situations, it can be useful to create a 3D graph. This post explains how to do this using R and plotly.px.gif

Read more...

The AsianBondsOnline portal of the ASEAN+3 Asian Bond Markets Initiative is a great resource for information on Asian bond markets, whether it's market size, currency denomination, pricing information, or liquidity stats. I often need a quick snapshot of the market, so I put together an R script to make life easier. This script fetches the latest data on local and foreign currency bonds from AsianBondsOnline, aggregates it for government and corporate bonds, and generates static and interactive graphs.px.gif

Read more...

I recently decided it was time to upgrade to the latest Ubuntu LTS (Long Term Support) release. The transition was straightforward, but setting up Fcitx, my preferred input method for Chinese and Japanese, wasn't quite as simple as I had hoped. Here's what I had to do to get it to work.px.gif

Read more...

I've recently been working a lot with R, a statistical programming language, and have built up a small collection of functions that I use regularly. One tool I've come to rely on is a function to obtain data from the United Nations' Comtrade database, an excellent resource for country-to-country trade statistics. Since there was no existing R package to access their new API (which is still in beta), I created my own function based on the sample code provided on their homepage and kept it in my personal files. I decided to package the code into an R package and share it here for others to use.px.gif

Read more...

If you have recently updated your Android device to the latest Android version 5 “Lollipop”, you may have noticed that the “Gallery” app has been replaced by Google's brand-new “Photos” app which ties in with Google Plus. For users who prefer to keep their gallery separate from Google's social network, there is a way to get back the familiar Gallery app without compiling it yourself: by pulling it from a CyanogenMod rom image. Here is how.px.gif

Read more...

After recently upgrading to Ubuntu 14.04 Trusty Tahr (LTS), I decided to give Fcitx, the default input method framework on Ubuntu's Chinese sister project Ubuntu Kylin, a try and I was pleasantly surprised. Not only is Fcitx rock-solid and actively developed, it also offers input methods for Japanese, Korean, Vietnamese and a bunch of other languages in addition to the default Chinese input methods. Here is how you get it to work on Ubuntu 14.04.px.gif

Read more...

I recently had to work on a Matlab assignment that required the use of fminbnd() to find local extrema. As I typically work in Octave rather than Matlab I ran into some problems getting my code to work within both programmes. As it turned out, Matlab and Octave handle the function slightly differently, so I thought I'd share my findings to save others some headache.px.gif

Read more...

Monitoring a server can be a lot of work, but thankfully handy tools like fail2ban or logwatch make the task a lot easier. Fail2ban, for example, monitors the log files of services running on your system and blocks incoming connections when it detects a break-in attempt (using iptables or hosts.deny). These need to be defined using a regex filter, and while a great number of templates are already available for the most-used services (Apache, SSH, etc.), OpenVPN thus far has not been included. Setting this up isn't too difficult, though.px.gif

Read more...

I have recently been playing around with LyX and XeTeX, a Unicode extension for TeX, to find a set-up that allows me to switch easily between various East Asian languages without entering LaTeX code. With the help of a few friends, the xeCJK manual and Richard Heck over at the LyX Mailing List, I was able to define LyX Text Styles for Chinese (Simplified and Traditional text), Japanese and Korean that can be selected via the context menu right from within LyX itself, allowing me to focus on the content of my writing and leaving the worrying about Unihan issues to someone else.px.gif

Read more...

Since Google decided to replace Google Talk with Hangouts and drop XMPP support in the process, many have been looking for alternative XMPP servers that allow connecting through standards-based clients and support federation. Below a list of alternatives I've come across.px.gif

Read more...

Enter your email to subscribe to updates.