BLOG

Plotting cumulative average abnormal (CAAR) on a graph in Stata

In Stata, we can use the two-way graph type for plotting abnormal returns or cumulative average abnormal returns against the days of the event window. Suppose that we have event window of 7 days, and have the following data     days caar1 caar2 caar3 caar4 -3 0 0 0 0 -2 -.0043456 -.0050911 .0000683

Read More

asdoc : options and examples

Tags : 

Introduction asdoc sends Stata output to Word / RTF format. asdoc creates high-quality, publication-ready tables from various Stata commands such as summarize, correlate, pwcorr, tab1, tab2, tabulate1, tabulate2, tabstat, ttest, regress, table, amean, proportions, means, and many more. Using asdoc is pretty easy. We need to just add asdoc as a prefix to Stata commands.

Read More

Rolling regressions, beta, t-statistics, and SE in Stata

asreg can easily estimate rolling regressions, betas, t-statistics and SE in Stata. To understand the syntax and basic use of asreg, you can watch this Youtube video. In this post, I show how to use asreg for reporting standard errors, fitted values, and t-statistics in a rolling window. To install asreg, type the following on

Read More

Publication quality regression tables with asdoc in Stata – video example

Tags : 

Creating publication-quality tables in Stata with asdoc is as simple as adding asdoc to Stata commands as a prefix. asdoc can create two types of regression tables. The first type (call it detailed) is the detailed table that combines key statistics from the Stata’s regression output with some additional statistics such as mean and standard

Read More

How to export high-quality table of correlations from Stata to MS Word

Tags : 

  For creating a high-quality publication-ready table of correlations from Stata output, we need to install asdoc program from SSC first. ssc install asdoc, update Once the installation is complete, we shall add the word asdoc to the cor or correlate command of Stata. Since we estimate correlations among all numeric variables of a dataset

Read More

How to use asdoc : a basic example

Tags : 

How to use asdoc Using asdoc is pretty easy. You need to add just asdoc as a prefix to Stata commands. For example, we use sum command to find summary statistics of all numeric variables in the dataset. We shall add just asdoc as a prefix to sum.  Let us load the auto.dta set for practice

Read More

asdoc : Sends Stata output to MS Word

About asdoc asdoc is a Stata program that makes the process of sending Stata output to MS Word super easy. asdoc creates high quality, publication-ready tables from various Stata commands such as summarize, correlate, tabstat, cross-tabs, regressions, t-tests, flexible table, and many more.   Installation The program can be installed by typing the following from the

Read More

Log vs simple returns: Examples and comparisons

Tags : 

Simple vs log returns Properties Conversion from daily to other frequencies MS Excel Example  [Download Example] id date prices simple ri log_ri ri+1 1 1/1/2010 70 1 1/2/2010 72 2.857% 2.817% 102.857% 1 1/3/2010 75 4.167% 4.082% 104.167% 1 1/4/2010 73 -2.667% -2.703% 97.333% 1 1/5/2010 74 1.370% 1.361% 101.370% 1 1/6/2010 76 2.703% 2.667%

Read More

Stata Dates: Conversion from one format to another

Case 1: From String to Stata format Usually, when we import data manually into the Stata Editor, the dates are shown in string format. For example, Nov202011, November202011, or  etc. We can use the gen command with date function gen newdate = date(oldDate, “MDY”)   Case 2: From daily to monthly gen monthly = mofd(daily_date)

Read More

Find annual | monthly cumulative (product) of returns

Tags : 

The problem Let’s say that we have daily stock returns. We want to convert those returns to cumulative returns for a weekly, monthly or yearly frequency. Where cumulative returns = (1+Ri1) * (1+Ri2) * (1+R3) * … (1+R4) – 1   Solution First create the weekly, monthly or year identifier, and then use asrol program.

Read More