Finance Data With Python And Pandas
Tags: Finance Fundamentals
Analyze Stocks with Pandas, Numpy, Seaborn & Plotly. Create, analyze & optimize Index & Portfolios (CAPM, Alpha, Beta)
Last updated 2022-01-10 | 4.6
- Step into the Financial Analyst role and give advice on a client´s financial Portfolio (Final Project)- Import large Financial Datasets / historical Prices from Web Sources and analyze
- aggregate and visualize them
- Calculate Return
- Risk
- Correlation and Rolling Statistics for Stocks
- Indexes and Portfolios
What you'll learn
* Requirements
* No specific Finance knowledge needed! The course intuitively explains the major fundamentals of Finance and Portfolio Theorie based on data examples.* Ideally some Spreadsheet Basics/Programming Basics (not mandatory
* the course guides you through the basics)
* A desktop computer (Windows
* Mac
* or Linux) capable of storing and running Anaconda. The course will walk you through installing the necessary free software.
* An internet connection capable of streaming videos
* Some high school level math skills would be great (not mandatory
* but it helps)
Description
The Finance and Investment Industry is experiencing a dramatic change driven by ever-increasing processing power & connectivity and the introduction of powerful Machine Learning tools. The Finance and Investment Industry is more and more shifting from a math/formula-based business to a data-driven business.
What can you do to keep pace?
No matter if you want to dive deep into Machine Learning, or if you simply want to increase productivity at work when handling Financial Data, there is the very first and most important step: Leave Excel behind and manage your Financial Data with Python and Pandas!
Pandas is the Excel for Python and learning Pandas from scratch is almost as easy as learning Excel. Pandas seems to be more complex at a first glance, as it simply offers so much more functionalities. The workflows you are used to do with Excel can be done with Pandas more efficiently. Pandas is a high-level coding library where all the hardcore coding stuff with dozens of coding lines are running automatically in the background. Pandas operations are typically done in one line of code! However, it is important to learn and master Pandas in a way that
you understand what is going on
you are aware of the pitfalls (Don´ts)
you know best practices (Dos)
MANAGE FINANCE DATA WITH PYTHON & PANDAS best prepares you to master the new challenges and to stay ahead of your peers, fellows and competitors! Coding with Python/Pandas is one of the most in-Demand skills in Finance.
This course is one of the most practical courses on Udemy with 200 Coding Exercises and a Final Project. You are free to select your individual level of difficulty. If you have no experience with Pandas at all, Part 1 will teach you all essentials (From Zero to Hero).
Part 2 - The Core of this Course
Import Financial Data from Free Web Sources, Excel- and CSV-Files
Calculate Risk, Return, and Correlation of Stocks, Indexes and Portfolios
Calculate simple Returns, log Returns, and annualized Returns & Risk
Create your own customized Financial Index (price-weighted vs. equal-weighted vs. value-weighted)
Understand the difference between Price Return and Total Return
Create, analyze and optimize Stock Portfolios
Calculate Sharpe Ratio, Systematic Risk, Unsystematic Risk, Beta and Alpha for Stocks, Indexes and Portfolios
Understand Modern Portfolio Theory, Risk Diversification and the Capital Asset Pricing Model (CAPM)
Forward-looking Mean-Variance Optimization (MVO) and its pitfalls
Get an exclusive insight into how MVO is used in Real World (and why it is NOT used in many cases) -> get beyond Investments 101 level!
Calculate Rolling Statistics (e.g. Simple Moving Averages) and aggregate, visualize and report Financial Performance
Create Interactive Charts with Technical Indicators (SMA, Candle Stick, Bollinger Bands etc.)
Part 3 - Capstone Project
Step into the Financial Analyst / Advisor Role and give advice on a Client´s Portfolio (Final Project Challenge).
Apply and master what you have learned before!
Part 4
Some advanced topics on handling Time Series Data with Pandas.
Appendix
Do you struggle with some basic Python / Numpy concepts? Here is all you need to know if you are completely new to Python!
Why you should listen to me...
In my career, I have built an extensive level of expertise and experience in both areas: Finance and Coding
Finance:
10 years experience in the Finance and Investment Industry...
...where I held various quantitative & strategic positions.
MSc in Finance
Passed all three CFA Exams (currently no active member of the CFA Institute)
Python & Pandas:
I led a company-wide transformation from Excel to Python/Pandas
Code, models, and workflows are Real World Project-proven
Instructor of the highest-rated and most trending general Course on Pandas
What are you waiting for? Guaranteed Satisfaction: Otherwise, get your money back with 30-Days-Money-Back-Guarantee.
Looking Forward to seeing you in the Course!
Who this course is for:
- Investment & Finance Professionals who want to transition from Excel into Python to boost their careers and working efficiency.
- (Finance) Students and Researchers who need to handle large datasets and reached the limits of Excel.
- Data Scientists who want to improve their Data Handling/Manipulation skills (in particular for Time Series Data)
- Everyone who want to step into (Financial) Data Science. Pandas is Key to everything.
- Everyone curious about how Financial Performance is measured and how (Stock) Indexes and Portfolios are created, analyzed, visualized and optimized. It´s the easiest way to understand the concepts with data examples rather than theories and formulas.
Course content
23 sections • 279 lectures
Course Overview and how to maximize your learning success Preview 10:05
Tips: How to get the most out of this Course (don´t skip!) Preview 05:27
Did you know that...? Preview 03:08
FAQ / Important Information Preview 02:37
Installation of Anaconda Preview 08:08
Opening a Jupyter Notebook Preview 09:29
How to use Jupyter Notebooks Preview 14:00
Welcome to Part 1: Intro Preview 01:01
Intro to Tabular Data / Pandas Preview 05:03
Tabular Data Cheat Sheets Preview 00:00
First Steps (Inspection of Data, Part 1) Preview 11:10
First Steps (Inspection of Data, Part 2) Preview 08:45
Coding Exercise 0: Coding the Video Lectures Preview 14:58
Built-in Functions, Attributes and Methods Preview 08:26
Make it easy: TAB Completion and Tooltip Preview 08:57
First Steps
Explore your own Dataset: Coding Exercise 1 (Intro) Preview 07:35
Explore your own Dataset: Coding Exercise 1 (Solution) Preview 04:35
Selecting Columns Preview 08:01
Selecting Rows with Square Brackets (not advisable) Preview 04:02
Selecting Rows with iloc (position-based indexing) Preview 07:42
Slicing Rows and Columns with iloc (position-based indexing) Preview 05:11
Position-based Indexing Cheat Sheets Preview 00:00
Selecting Rows with loc (label-based indexing) Preview 05:11
Slicing Rows and Columns with loc (label-based indexing) Preview 11:28
Label-based Indexing Cheat Sheets Preview 00:00
Summary and Outlook Preview 09:38
Indexing and Slicing
Coding Exercise 2 (Intro) Preview 01:22
Coding Exercise 2 (Solution) Preview 06:31
Intro Preview 00:13
First Steps with Pandas Series Preview 06:44
Analyzing Numerical Series with unique(), nunique() and value_counts() Preview 13:10
UPDATE Pandas Version 0.24.0 (Jan 2019) Preview 00:08
EXCURSUS: Updating Pandas / Anaconda Preview 06:34
Analyzing non-numerical Series with unique(), nunique(), value_counts() Preview 07:17
The copy() method Preview 03:57
Sorting of Series and Introduction to the inplace - parameter Preview 08:59
Pandas Series
Coding Exercise 3 (Intro) Preview 01:30
Coding Exercise 3 (Solution) Preview 04:53
First Steps with Pandas Index Objects Preview 05:57
Changing Row Index with set_index() and reset_index() Preview 10:07
Changing Column Labels Preview 03:20
Renaming Index & Column Labels with rename() Preview 03:51
Pandas Index Objects
Coding Exercise 4 (Intro) Preview 01:11
Coding Exercise 4 (Solution) Preview 03:42
Sorting DataFrames with sort_index() and sort_values() Preview 09:01
nunique() and nlargest() / nsmallest() with DataFrames Preview 05:30
Filtering DataFrames (one Condition) Preview 10:20
Filtering DataFrames by many Conditions (AND) Preview 04:45
Filtering DataFrames by many Conditions (OR) Preview 05:04
Advanced Filtering with between(), isin() and ~ Preview 08:35
any() and all() Preview 04:07
Sorting and Filtering
Coding Exercise 5 (Intro) Preview 01:19
Coding Exercise 5 (Solution) Preview 08:13
Intro to NA Values / missing Values Preview 08:52
Handling NA Values / missing Values Preview 10:51
Exporting DataFrames to csv Preview 02:14
Summary Statistics and Accumulations Preview 10:26
The agg() method Preview 03:27
Coding Exercise 6 (Intro) Preview 01:50
Coding Exercise 6 (Solution) Preview 10:21
Intro Preview 00:27
Visualization with Matplotlib (Intro) Preview 08:48
Customization of Plots Preview 12:56
Histogramms (Part 1) Preview 04:34
Histogramms (Part 2) Preview 06:28
Scatterplots Preview 07:18
First Steps with Seaborn Preview 05:24
Categorical Seaborn Plots Preview 13:33
Seaborn Regression Plots Preview 12:21
Seaborn Heatmaps Preview 08:17
Coding Exercise 7 (Intro) Preview 01:02
Coding Exercise 7 (Solution) Preview 07:30
Intro Preview 00:08
Removing Columns Preview 05:18
Removing Rows Preview 07:06
Adding new Columns to a DataFrame Preview 03:27
Arithmetic Operations (Part 1) Preview 11:59
Arithmetic Operations (Part 2) Preview 10:55
Creating DataFrames from Scratch with pd.DataFrame() Preview 07:43
Adding new Rows (Hands-on) Preview 02:55
Adding new Rows to a DataFrame Preview 13:51
Manipulating Elements in a DataFrame Preview 04:42
Coding Exercise 8 (Intro) Preview 00:59
Coding Exercise 8 (Solution) Preview 06:11
Introduction to GroupBy Operations Preview 02:02
Understanding the GroupBy Object Preview 08:05
Splitting with many Keys Preview 06:49
split-apply-combine Preview 09:36
split-apply-combine applied Preview 11:59
Hierarchical Indexing with Groupby Preview 06:18
stack() and unstack() Preview 13:31
GroupBy
Coding Exercise 9 (Intro) Preview 00:56
Coding Exercise 9 (Solution) Preview 06:05
Importing Time Series Data from csv-files Preview 08:16
Converting strings to datetime objects with pd.to_datetime() Preview 08:53
Initial Analysis / Visualization of Time Series Preview 05:41
Indexing and Slicing Time Series Preview 07:25
Creating a customized DatetimeIndex with pd.date_range() Preview 15:33
More on pd.date_range() Preview 03:01
Coding Exercise 10 (intro) Preview 01:14
Coding Exercise 10 (Solution) Preview 05:25
Downsampling Time Series with resample() (Part 1) Preview 14:20
Downsampling Time Series with resample (Part 2) Preview 08:26
The PeriodIndex object Preview 06:03
Advanced Indexing with reindex() Preview 08:48
Coding Exercise 11 (intro) Preview 01:12
Coding Exercise 11 (Solution) Preview 05:30
Intro Preview 00:25
Getting Ready (Installing required library) Preview 02:42
Importing Stock Price Data from Yahoo Finance (it still works!) Preview 09:29
Initial Inspection and Visualization Preview 05:32
Normalizing Time Series to a Base Value (100) Preview 06:31
The shift() method Preview 06:51
The methods diff() and pct_change() Preview 06:41
Measuring Stock Performance with MEAN Returns and STD of Returns Preview 08:49
Financial Time Series - Return and Risk Preview 08:30
Risk & Return
Financial Time Series - Covariance and Correlation Preview 04:32
Coding Exercise 12 (intro) Preview 02:30
Coding Exercise 12 (Solution) Preview 07:28
Intro Preview 02:50
Importing Financial Data from Excel Preview 11:25
Simple Moving Averages (SMA) with rolling() Preview 08:44
Momentum Trading Strategies with SMAs Preview 07:08
Trading Strategies
S&P 500 Performance Reporting - rolling risk and return Preview 11:25
S&P 500: Investment Horizon and Performance Preview 09:42
Simple Returns vs. Log Returns Preview 09:18
Simple Returns vs. Log Returns
The S&P 500 Return Triangle (Part 1) Preview 06:19
The S&P 500 Return Triangle (Part 2) Preview 09:20
Interpreting the Return Triangle
The S&P 500 Dollar Triangle Preview 04:08
The S&P 500 "Weather Radar" Preview 04:42
Exponentially-weighted Moving Averages (EWMA) Preview 04:32
Expanding Windows Preview 05:07
Rolling Correlation Preview 07:11
rollling() with fixed-sized time offsets Preview 06:13
Merging / Aligning Financial Time Series (hands-on) Preview 05:02
Coding Exercise 13 (intro) Preview 02:38
Coding Exercise 13 (Solution) Preview 12:31
Financial Indexes - an Overview Preview 09:13
Financial Indexes
Getting the Data Preview 03:29
Price-Weighted Index - Theory Preview 08:21
PWI
Creating a Price-Weighted Stock Index with Python Preview 08:49
Equal-Weighted Index - Theory Preview 05:37
EWI
Creating an Equal-Weighted Stock Index with Python Preview 07:59
Market Value-Weighted Index - Theory Preview 08:41
VWI
Creating a Market Value-Weighted Stock Index with Python (Part 1) Preview 08:00
Creating a Market Value-Weighted Stock Index with Python (Part 2) Preview 07:20
Comparison of weighting methods Preview 05:26
Price Index vs. Performance/Total Return Index Preview 06:13
Coding Exercise 14 (intro) Preview 01:34
Coding Exercise 14 (Solution) Preview 07:37
Intro Preview 03:43
Getting the Data Preview 02:07
Creating the equally-weighted Portfolio Preview 08:11
Creating many random Portfolios with Python Preview 12:09
What is the Sharpe Ratio and a Risk Free Asset? Preview 04:33
Portfolio Analysis and the Sharpe Ratio with Python Preview 07:51
Sharpe Ratio and Risk Free Asset
Finding the Optimal Portfolio Preview 06:51
Excursus: Portfolio Optimization with scipy Preview 00:03
Sharpe Ratio - visualized and explained Preview 05:07
Portfolios
Coding Exercise 15 (Intro) Preview 02:45
Coding Exercise 15 (Solution) Preview 10:27
Intro Preview 01:46
Capital Market Line (CML) & Two-Fund-Theorem Preview 03:07
Two-Fund-Theorem
The Portfolio Diversification Effect Preview 12:56
Systematic vs. unsystematic Risk Preview 12:22
Risk Diversification
Capital Asset Pricing Model (CAPM) & Security Market Line (SLM) Preview 07:47
CAPM
Beta and Alpha Preview 07:21
Redefining the Market Portfolio Preview 07:32
Cyclical vs. non-cyclical Stocks - another Intuition on Beta Preview 06:17
Beta and Alpha
Coding Exercise 16 (Intro) Preview 02:34
Coding Exercise 16 (Solution) Preview 09:01
Intro Preview 04:38
Mean-Variance Optimization (MVO) Preview 08:51
It´s not that simple - Part 1 (Investments 101 vs. Real World) Preview 06:58
Changing Expected Returns Preview 06:25
It´s not that simple - Part 2 (Investments 101 vs. Real World) Preview 10:37
Intro Preview 01:34
Getting Ready (Installing required libraries) Preview 01:53
Creating Offline Graphs in Jupyter Notebooks Preview 07:36
Interactive Price Charts with Plotly Preview 05:07
Customizing Plotly Charts Preview 05:15
Interactive Histograms with Plotly Preview 06:02
Candle-Stick and OHLC Charts with Plotly Preview 04:22
SMA and Bollinger Bands with Plotly Preview 06:05
More Technical Indicators with Plotly (Volume, MACD, DMI) Preview 01:53
Coding Exercise 17 Preview 00:10
Financial Analyst Challenge (Intro) Preview 01:22
Financial Analyst Challenge (Instruction & Hints) Preview 03:26
Financial Analyst Challenge (Solution Part 1) Preview 02:00
Financial Analyst Challenge (Solution Part 2) Preview 07:07
Financial Analyst Challenge (Solution Part 3) Preview 06:08
Financial Analyst Challenge (Solution Part 4) Preview 04:53
Financial Analyst Challenge (Solution Part 5) Preview 04:53
Financial Analyst Challenge (Solution Part 6) Preview 07:31
Financial Analyst Challenge (Solution Part 7) Preview 07:36
Additional Bonus Question Preview 00:32
At the end of the year 2018, you agreed with Mary to construct her Portfolio in a way that it contains the five largest stocks (in terms of Market Capitalizations) for the Sectors Basic Industries, Consumer Durables and Public Utilities and Health Care (use listings_clean.csv). Since January 01, 2019 her new Portfolio contains these 20 Stocks that are Market Cap weighted in her Portfolio.
The next meeting with Mary is scheduled for July 2019 and is all about the past performance of her new Portfolio from 2019-01-01 until 2019-06-30.
Create and analyse her Portfolio (Risk, Return, Sharpe Ratio, Beta, Alpha) in comparison to the Market Portfolio (S&P 500 TR) and her former Health Care Portfolio (assume a risk-free return of 2%). Do you think Mary is happy with her new Portfolio?
Have Fun!