Tuesday, July 14, 2020

CODES

CODES

Data Cleaning and Blending



The NYT dataset doesn’t include information about county population, so I’m going to merge the two datasets into one using Python and pd.merge().
merge in Pandas
by using a SQL JOIN or 
a VLOOKUP in Excel


Before we do that, we first need to clean the data 

check the Github repo here.

Monday, July 13, 2020

Support Vector Machines

Support Vector Machines, Clearly Explained!!!



Plot an ROC Curve in Python

How to Plot an ROC Curve in Python | Machine Learning in Python




OC and AUC, Clearly Explained!


ROC and AUC in R



machine learning and data science on cloud

run machine learning and data science on cloud using high processing GPUs at no COST




https://colab.research.google.com/





Google Colaboratory supports Python version 2.7 and 3.6
I see an example how to use Swift in Colab a while ago


# Please try the newer version here:

https://colab.research.google.com/drive/1BYnnbqeyZAlYnxR9IHC8tpW07EpDeyKR

or Kaggle R jupyter notebook which supports R and Rstan by default:

https://www.kaggle.com/thimac/rstan?scriptVersionId=20867095


How to use R and Python in same notebook on Google Colab





How to Build Your First Data Science Web App in Python (Streamlit Tutorial Part 1)





Sunday, July 12, 2020

Event Studies.py

EventStudies.py




I do have a project going on and wanted to check if you can help me with any of my challenges.

Project: Comparative Analysis on stock returns around M&A announcements.
I need an expert / consultant in Data Analysis and Econometrics with access to professional databases and knowledge possibly in Python, R, Stata or similar tools to conduct an event study with multiple event windows done on a large dataset.
Vision:
I have identified a list of ~17k transactions (the sample) that fulfil the selection criteria. I intend to conduct an event study in order to find abnormal returns for acquirer, target and both combined. The results shall then be presented.
My challenges:
- Reducing the sample? Yes or No?
- Identifying the right indices or basket of comparable (industry, geography, liquid) stock as a proxy of the market portfolio to regress against.
- Sourcing the data for the large amount of transactions (acquirer, target, market portfolio.
- Cleaning the data and making sure that for each transaction there are an equal amount of observations.
- Estimate normal returns based on respective market portfolio chosen for the specific event
- Cumulative Abnormal returns for all Acquirers, Targets and both combined (Whole Sample)
- Testing for significance
- Dividing the data into two cohorts based on one simple selection criteria
- Cumulative Abnormal returns for all Acquirers, Targets and both combined (Cohort 1 & Cohort 2)
- Testing for significance
Requirements:
• The candidate must have proven knowledge and understanding of conducting event studies, data anlysis and econometrics.
• The candidate should have a good understanding of the academic literature surrounding event studies.
• The candidate must have access to professional databases like Bloomberg, Datastream, CapitalIQ or comparable.
Expectations:
- A solution that requires as little manual intervention as possible and can be reused with a different data set.
- Support in word and deed and act as a consultant.
- Model documentation and validation including relevant tables and graphs and descriptive statistics
- Source code, if any
Specifications:
Budget: 250 doller, Delivery time: 7 days (Jul. 16 2020)
Tool: Python

PYTHON SHELL