703, 2020

Using the bysort prefix with tab commands in asdoc | Stata

March 7th, 2020|Categories: asdoc|Tags: , , |0 Comments

Recently, Scott Siegal asked for the possibility of adding the bysort prefix with tabulate, tab, tab1, and tab2 commands to asdoc. Honoring his request, I have added the bysort support to asdoc. The new version of asdoc can be installed from my site. Copy and paste the following line in Stata and press enter. net install [...]

1702, 2020

What is a Python Dictionary

February 17th, 2020|Categories: Uncategorized|Tags: , , |1 Comment

          Python Dictionary¶ Dictionary is a method in which data is stored in pairs of keys and values. These are also called Associative Arrays in other programming languages.   What is key-value pair?¶ key is a unique identifier for a given record. Values are data stored in that identifier. For example, Let [...]

1102, 2020

Getting Started with Data Visualization in Python Pandas

February 11th, 2020|Categories: Blog|Tags: , , , |0 Comments

DOWNLOAD DATASETS¶ To download the datasets used in this tutorial, pleas see the following links 1. gapminder.tsv 2. pew.csv 3. billboard.csv 4. ebola.csv 5. tips.csv TED Talk Dataset Excercises¶ In [5]: # Change directory In [6]: cd "D:\Dropbox\CLASSES\Data Science for Finance\Python\Lecture 1 - Assignment" D:\Dropbox\CLASSES\Data Science for Finance\Python\Lecture 1 - Assignment In [7]: import pandas as pd In [8]: ted [...]

2201, 2020

Step-by-Step: Portfolio Risk in Stata and Excel

January 22nd, 2020|Categories: Uncategorized|0 Comments

Portfolio Risk in Excel To build our concept of the portfolio risk, we shall calculate it first manually in EXCEL, then we shall replicate the results using matrix notations in Stata. Consider the following set of returns for two assets, i.e asset A and B.     A       B    .249917 .819483 .739069 .821416 .895491 .276843 .902722 .001586 .078344 [...]

2412, 2019

How Fama and French June to July Portfolios are Constructed?

December 24th, 2019|Categories: Asset Pricing Research, Blog|Tags: , , , , |1 Comment

The description of portfolios' construction given in various Fama and Fench papers is usually confusing for many researchers, especially those who are new to asset pricing models. The typical language used in Fama and French papers reads like this The size breakpoint for year t is the median NYSE market equity at the end of June [...]