Publications by ntguardian

An Introduction to Stock Market Data Analysis with R (Part 2)

03.04.2017

Around September of 2016 I wrote two articles on using Python for accessing, visualizing, and evaluating trading strategies (see part 1 and part 2). These have been my most popular posts, up until I published my article on learning programming languages (featuring my dad’s story as a programmer), and has been translated into both Russian (which...

18959 sym R (22863 sym/20 pcs) 52 img

Transaction Costs are Not an Afterthought; Transaction Costs in quantstrat

10.04.2017

DISCLAIMER: Any losses incurred based on the content of this post are the responsibility of the trader, not the author. The author takes no responsibility for the conduct of others nor offers any guarantees. Introduction: Efficient Market Hypothesis Burton Malkiel, in the finance classic A Random Walk Down Wall Street, made the accessible, popula...

13337 sym R (26199 sym/12 pcs) 14 img

Order Type and Parameter Optimization in quantstrat

24.04.2017

DISCLAIMER: Any losses incurred based on the content of this post are the responsibility of the trader, not the author. The author takes no responsibility for the conduct of others nor offers any guarantees. Introduction You may have noticed I’ve been writing a lot about quantstrat, an R package for developing and backtesting trading strategies...

14350 sym R (39181 sym/16 pcs) 40 img

The End of the Honeymoon: Falling Out of Love with quantstrat

22.05.2017

Introduction I spent good chunks of Friday, Saturday, and Sunday attempting to write another blog post on using R and the quantstrat package for backtesting, and all I have to show for my work is frustration. So I’ve started to fall out of love with quantstrat and am thinking of exploring Python backtesting libraries from now on. Here’s my st...

15394 sym R (5854 sym/7 pcs) 6 img

Who Survives Riddler Nation?

05.06.2017

Introduction Last week, I published an article on learning to fight in the Battle for Riddler Nation. Here’s a refresher of the rules: In a distant, war-torn land, there are 10 castles. There are two warlords: you and your archenemy. Each castle has its own strategic value for a would-be conqueror. Specifically, the castles are worth 1, 2, 3...

13143 sym R (29231 sym/24 pcs) 24 img 5 tbl

Stock Trading Analytics and Optimization in Python with PyFolio, R’s PerformanceAnalytics, and backtrader

28.06.2017

Introduction Having figured out how to perform walk-forward analysis in Python with backtrader, I want to have a look at evaluating a strategy’s performance. So far, I have cared about only one metric: the final value of the account at the end of a backtest relative. This should not be the only metric considered. Most people care not only about...

25619 sym Python (31686 sym/14 pcs) 22 img 15 tbl

Downloading S&P 500 Stock Data from Google/Quandl with R (Command Line Script)

10.07.2017

DISCLAIMER: Any losses incurred based on the content of this post are the responsibility of the trader, not me. I, the author, neither take responsibility for the conduct of others nor offer any guarantees. None of this should be considered as financial advice; the content of this article is only for educational/entertainment purposes. While most...

5048 sym R (6631 sym/1 pcs) 4 img

Problems In Estimating GARCH Parameters in R

02.11.2017

These days my research focuses on change point detection methods. These are statistical tests and procedures to detect a structural change in a sequence of data. An early example, from quality control, is detecting whether a machine became uncalibrated when producing a widget. There may be some measurement of interest, such as the diameter of a b...

18305 sym R (21657 sym/19 pcs) 178 img

R Function for Simulating Gaussian Processes

26.01.2018

This semester my studies all involve one key mathematical object: Gaussian processes. I’m taking a course on stochastic processes (which will talk about Wiener processes, a type of Gaussian process and arguably the most common) and mathematical finance, which involves stochastic differential equations (SDEs) used for derivative pricing, includi...

3082 sym R (1145 sym/1 pcs) 20 img

A Recession Before 2020 Is Likely; On the Distribution of Time Between Recessions

19.04.2018

I recently saw a Reddit thread in r/PoliticalDiscussion asking the question “If the economy is still booming 2020, how should the Democratic address this?” This gets to an issue that’s been on my mind since at least 2016, maybe even 2014: when will the current period of economic growth end? For some context, the Great Recession, as economi...

9177 sym R (4150 sym/13 pcs) 14 img