Skip to content

EventStudyTools/stata-wrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eventstudytools — Stata API wrapper

Run abnormal-return event studies from Stata on the eventstudytools.com research API: est_arc uploads your data, runs the calculation on the server and downloads the result files.

Works on Stata 14+ (Windows, macOS, Linux). Requires the curl command line tool, which ships with Windows 10+, macOS and most Linux distributions.

Installation

net install est_arc, from("https://raw.githubusercontent.com/EventStudyTools/stata-wrapper/main")

or copy est_arc.ado and est_arc.sthlp into your personal ado directory (sysdir shows it, usually PERSONAL).

API key

Request your free API key at eventstudytools.com/api-key.

Quickstart

est_arc, apikey("YOUR_API_KEY")            ///
    requestfile("01_RequestFile.csv")      ///
    firmdata("02_FirmData.csv")            ///
    marketdata("03_MarketData.csv")        ///
    destdir("results")

import delimited "results/caar_results.csv", delimiter(";") varnames(1) clear

Sample data (20 US firms, S&P 500 benchmark) lives in examples/data/; a runnable do-file in examples/run_arc.do.

Options

Option Values Default
app() arc, avc, avyc arc
benchmarkmodel() mm, mm-sw, mam, cpmam, ff3fm, ffm4fm, ff5fm, garch, egarch, capm mm
returntype() log, simple log
nontradingdays() later, earlier, keep, skip later
resultfiletype() csv, xls, xlsx, ods csv
teststatistics() see help file six workhorse statistics
destdir() directory results
deadline() seconds 600

See help est_arc after installation for the full reference including input file formats.

Input files

Semicolon-separated CSV files without header rows, dates as dd.mm.yyyy:

  • Request file: Event ID; Firm ID; Market ID; Event date; Grouping variable; Event window start; Event window end; Estimation window end; Estimation window length
  • Firm data: Firm ID; Date; Closing price
  • Market data: Market ID; Date; Index value

Result files

ar_results.csv, car_results.csv, aar_results.csv, caar_results.csv, analysis_report.csv, results_table_export.txt — all semicolon-separated, ready for import delimited.

License

MIT

About

Stata command est_arc for the eventstudytools.com event study research API

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors