Resources
This section contains resources and links to outside miscellaneous materials that I found useful when doing research or programming.
Links in the External Programming Resources section go to sites and blog posts that do not belong to me. Links in Workflow section go to the official sites for the corresponding apps.
You can find my teaching materials in the Teaching page. For a list of teaching and research assistantship experiences, please see the CV section.
Please let me know if any links are dead/outdated. You can email me at ben.charoenwong@nus.edu.sg.
July 2022: Official Announcement https://www.set.or.th/th/education-research/research/database/factor-library/overview
Overview: The factor library with Thai market Fama-French and Q-factors was constructed in collaboration with Kanis Saengchote at Chulalongkorn University. The data are maintained live by the Stock Exchange of Thailand.
Data: All data come from the Stock Exchange of Thailand from official filings and recording of trading, with no lookahead or survivorship bias.
Programming/Scripting
Optimal Trading Execution Code for Minimizing Execution Cost: This script contains the functions for the base (parametric with closed form solutions) version of the optimal trading execution according to Bertsimas and Lo (1998). It shows how optimal trading should depend on how aggressive other market participants are, how noisy the fundamental information is, and other fundamental parameters. All parameters are defined according to the original paper.
I also have some intro to R slides, intro to R memory management, and some sample code:
Script downloading Useful Packages in R.
Chicago Booth PhD Student Website Template: This links to my BitBucket repository that contains instructions and sample files to set up a website, following the template and color scheme of Chicago Booth. The site scales with screens of different sizes.
External Programming Resources
These range from basic to intermediate R, and do not belong to me.
R Tidyverse Style Guide provides great guidelines, but I also adopt the deviations from Google's style guide (fork of the Tidyverse Guide).
Tidyverse Data Science Course Textbook from John Hopkins University.
Why R?: Great slide deck on the power of R with great graphics and visualizations written in R.
New to R? Try Swirl! : This website contains lots of useful tutorials.
Tidy Finance with R: Free e-book with sample code on using tidyverse to do quantitative finance.p
R: Intro to data.table Package: Once you get past the learning curve, you will not go back to base R.
R: The apply function family: R users should know about this. However, to apply functions by groups (rather than by rows), use data.table or dplyr.
R: Example plots using ggplot2 with code: Shows some of the capabilities of ggplot.
R: ggplot2: slides by Hadley Wickham.
R: ggplot2 Visualization Gallery: Useful examples for inspiration.
R: ggplot2 Extension Visualization Gallery: Useful examples for inspiration using extensions to ggplot2.
R: Benchmarking data.table vs. pandas vs. dplyr: I have gotten into lots of discussion about whether python or R is faster. The answer: It doesn't matter much for small data, but data.table seems to win for larger data sets.
R: 11 Tips to Handle Big Data: A short, incomplete list but useful nonetheless. Turns out R isn't great at handling big data (where big data:= data > 1 TB).
R for Big Data: A cool mindmap of useful R packages for managing and analyzing big data. I would personally add ggplot2 into the Visualization category.
R: Compressing Data Files to Save Space: This saved me an unbelievable amount of space when working with TAQ data.
R: Stargazer Cheat-sheet: In case you need to customize output.
R: Tips with data.table: Fairly advanced looping and editing data in memory.
R: Preparing your Own Package and Shiny Apps: Some tips and instructions on unit testing for packages prior to pushing to GitHub and submitting to CRAN.
R: Different file formats: A blog covering rds, feather, fst file formats for fast read/write and interoperability between R and Python.
R: Visualization from VIS 2017 Conference: Good examples of data visualization with R for inspiration.
Data Handling: LocustDB > Clickhouse. Also an overview of Online Analytical Processing (OLAP).
Primer on Advanced Text Analysis: Guide on considering different text similarity measures that can take into account the semantics and grammar in addition to simple word similarity.
Visualizing Transition Matrices: Snippet showing how to visualize transitions with different features. Does not use graph theory.
Introduction to Git for Beginners, Grant McDermott's Version Control Slides with GitHub, and Jenny Bryan's Introduction
R: What They Forgot (wtf): For intermediate R users who are mostly self-taught. More advanced topics like code maintenance, library maintenance, version maintenance.
Misleading Visualization from the Economist: 40 Examples from one of the Economist's data journalists, showing both the original (misleading) and better plots.
Data Visualization Lesson Materials from Dr. Andrew Heiss at Georgia State University: Great e-book, lesson plan, assignments, sample code.
Data Science Bootcamp for High Schoolers: by David Kane.
Workflow
Mendeley: Having used it since I started grad school, I can't imagine what a pain it must be to maintain a huge library of PDF's without this organizer.
LyX: For doing all things LaTeX (although more recently I tend to use PowerPoint more for slides).
Slack: For an organised chat group where we can share files.
Asana Project Management: I learned about this from Matt Gentzkow and Jesse Shapiro's Research guide. This has been immensely useful for collaboration. The integration with Google Calendar is particularly useful for me. However, like Slack, I feel this works better for more stable research/co-author teams.
BitBucket: For writing and code documentation, particularly for team collaboration. Also useful for storing different iterations of output.
Random
Really random stuff that are nice short breaks from work.
Course and Textbook on writing research by Econscribe. Disclaimer: I went through this program as well.
Online Textbook on Data Visualization: by Claus Wilke, with everything built in R and source code available through GitHub.
Tips for Economists: A collection of tips from various great sources all collected in one place.
Language-Agnostic Coding Advice for Economists by Ljubica Ristovska, from a presentation at the Harvard Economics Professional Development workshop. Spring 2019.
A very useful, free Econometrics Textbook by Scott Cunningham at Baylor University. Comes with a Spotify playlist of accompanying rap!
Open Source Etiquette: Best be nice; especially when help is needed.
Best Figures in Economics: Curated best pictures in economics research (credit to Paul Goldsmith-Pinkham at Yale and others.)
R for Data Journalism: Useful packages, examples, and tips to integrate data into articles.
A Bunch of Spurious Correlations: Do you find yourself coming up with stories for them?
Typing Test - Check Your Speed!: Comes in handy for checking how quick students can type, which affects the speed to go over code in class.
Library of Statistical Techniques (LOST): Open-sourced e-book on statistical techniques, created by Nick Huntington-Klein at Seattle University.
Econometrics Resources for R (and Stata) from Nick Huntington-Klein at Seattle University. The Causal Inference Animated Plots are particularly cool.
Lecture Notes for PhD Economics. An amalgamation of different course syllabus and lecture notes.
AFA Presidential Addresses from 1972 through 2026, compiled by Malcolm Wardlaw.
Financial History Resources: by Investor Amnesia.
A tool to split rent, a bill, or even workload.
Guideline and introspection framework on picking a career, from waitbutwhy.
How to pick a career, and why it is so important, from 80,000 Hours.
Intro to Computational Finance with R & Financial Econometrics - by Eric Zivot.