How to Learn Financial Analysis in Python 10x Faster
Key Takeaways
Demonstrates how to learn financial analysis in Python 10x faster using the Mito library
Full Transcript
hello all my name is krishak and welcome to my YouTube channel so guys in this specific video we are going to see that how you can learn and perform financial analysis using python with the help of Mito library now this Mito library is super cool Library which can actually help you to work with Tabet data and do some amazing analysis Jacob from the Mito team has actually created this specific video so please make sure that you watch this video till the end and try to the power of moo sheet in your use cases and in your problem statements moo is a spreadsheet that generates python code for every edit that you make today let's pretend that we're a financial analyst at Vanguard we're going to build a report that looks at fun performance for the year 2022 to do so I'm going to import some data first we're going to look at the fund info data I'm importing just a CSV file to get started with this has the fund name the portfolio manager and some additional data about each fund notice that Mido has started to generate the equivalent code for every edit that we make inside of the spreadsheet that means as a Excel first analyst I can take those skills and turn them into python code just using M the next thing I'm going to do is import some additional data this time I want my fun performance data this data lives in a database and instead of having to write the SQL query to do it myself I'm going to rely on Leo to do that for me I'm just going to sign in with my username and password and tell Mido which year I want to look at data for when I click the import data button Mido is going to execute that SQL query for me and return the data into my spreadsheet there's a bunch of different ways of getting data into Mido so far we've looked at cssv files and importing data from a database but if you look at the Mito documentation you can also import things like Excel files as well as reading data from remote file systems importing data frames and importing data from other other dat data sources that we haven't yet talked about now that I have this data I can see that it has the date the fund and the month over month of returns we're interested in building a report that looks at for each fund and each fund manager what is the month over month return earned for each month so to do so I'm going to combine these two data sets I'm interested in pulling over this portfolio manager column I'm going to add a new column just like I would in Excel and call it fund manager and then I'm going to use a v lookup for formula again this is exactly how I would do this in Excel I'm going to look at these two columns and perform that V lookup again Mido is generating the equivalent python code for every edit so I can just worry about building my analysis like I would in Excel and let moido handle all of the pyth thinking for me one of the things that I notice is that some of these funds for example this one here has multiple fund managers for this report we want to see each individual fun manager on a new row so to do that I'm going to use a custom edit I've built this custom function called separate row and all I have to do is to tell my where how I want to separate this row we want to separate the fun manager and then I want to separate on the comma when I click separate row on eliminer it's going to break each one of those fields into a new row this is an example of functionality that doesn't natively exist inside of excel but it can exist inside of Mido python is a really powerful and flexible programming language that allows you to express complex logic pretty simply and Mido is an interface on top of that python code that that makes it even easier to work with it the next thing that we're going to do is create a pivot table to do so I'm going to click this pivot button and what we want to look at is for each fund and for each fund manager we want to see the month over month return earns but we don't want to just see the sum of the yearly month over month returns instead we want to look look at the month over Monon returns for each year inside of the month so what we see now is for January 2022 the month over Monon returns for February over 2022 the month over month returns all the way for the full year this is exactly the report that my manager wanted me to show them so the next thing I want to do is clean up this report a little bit to make it easy to show my manager to do so I'm going to do a couple things first I'm going to apply some conditional formatting I'm going to add a conditional formatting rule to all of the month over Monon return columns and let's say if the return is greater than zero then we want to highlight this in a nice green color and and similarly if the return is less than zero but that's highlighted it in a red to make a good stand out that's a lot better I feel like if my manager is going to be able to understand that but my manager likes things likes to see things in Excel so showing them this view is probably not going to cut it to do so I'm going to export this as a Excel file let's call this Vanguard performance I want it as an Excel file and I want to export it with all of this conditional form Ting now when I click the generate export code button it's going to add a new line of code to the bottom of my script that takes this ex this file that we've created and generates an Excel file when I run that code it's going to create a new file called the Vanguard performance xlsx file let me open that and show you what that looks like download it I have the exact same view that I had in my M sheet in Excel this is ready to send to my manager but before I send this to my manager I think they'll also going to want to see some of this data represented as a graph I'm going to flip back to my my DOA sheet and create a graph to send to my manager along with the Excel file the graph that I want to show my manager is the average month of over month performance for each fund to create that information I'm going to scroll all the way to the right of my data set click the add column button and create the average month over month I'm going to use the average formula and just like I would in Excel I'm going to select all of the columns that I want to include in my average this has calculated the average for the entire data frame all 98 rows so so far we've looked at using a v lookup an average formula but moo supports a huge variety of formulas if you look at the moo documentation and look at our formula reference you can see all about a 100 formulas that M supports it's all of the most common data cleaning uh string parsing arithmetic and date operating formulas now that we've created the average month- over month column the last step that we need to do before building the graph is actually D duplicate this data because we split the fund managers into multiple rows if if if fund had multiple fund managers for example this one here we're going to see two entries for them and that's going to throw off our graph to D duplicate the data I'm going to click the data button I'm going to click remove dup duplicates and I'm going to select how do I want to duplicate my data in this case any time that the fund exists multiple times we're just going to drop the first one D duplicating the data as easy as that we've removed 12 duplicate rows from our data frame now that I've prepped my data the last step is to actually build the graph to do so I'm going to click on the fund and the average month over month return column and select graph M's going to start to build the graph for me the last step that I want to do before calling this done is actually clean up the graph a little bit let's close that since we already have our data and let's maybe rename this let's call this average month over month return since there's a lot going on in this graph let's also maybe clean it up a little bit I don't think we you need to display the graph um grid lines instead of calling this fun let's call this Vanguard fund perfect so this graph looks really good to me I think my manager is going to be happy with it because plotly graphs like the one here are default interactive I want to preserve this interactivity when I share it with my manager to do so I'm going to export this not as just a PNG file but as an HTML file when I copy the code and I scroll down to paste it here I see that the output is creating an HTML file so let me run the code and look at the HTML file perfect so this is what the graph looks like it's an HTML file that I can embed it in an email and my manager can scroll over the different data points and see the average month over month return I'm going to save this I'm going to put it in an email and send it it to my manager let's do that now hey Nate just finished up the month over month report let me know if you want to see any changes and then I'm just going to attach my files want the graph Z and the Vanguard from performs this is what the resulting email looks like it has the full Vanguard Fund performance Excel file and it has the graph that we generated
Original Description
Mito is the fastest way to do Python data science. Edit your data in a spreadsheet, and generate Python code automatically.
1. Mito Install instructions:
https://bit.ly/3SDncoi
2. Mito Website:
https://bit.ly/49bLWuU
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from Krish Naik · Krish Naik · 0 of 60
← Previous
Next →
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Natural Language Processing|Stemming
Krish Naik
Natural Language Processing|BagofWords
Krish Naik
Gaussian distribution or Normal Distribution in statisctics
Krish Naik
Natural Language Processing|TF-IDF for Machine Learning| Text Prerocessing
Krish Naik
Log Normal Distribution in Statistics
Krish Naik
Covariance in Statistics
Krish Naik
Confusion matrix, Precision, Recall| Data Science Interview questions
Krish Naik
Tutorial 44-Balanced vs Imbalanced Dataset and how to handle Imbalanced Dataset
Krish Naik
Implementing a Spam classifier in python| Natural Language Processing
Krish Naik
Tutorial 11-Exploratory Data Analysis(EDA) of Titanic dataset
Krish Naik
Face Recognition using open CV and VGG 16 Transfer Learning
Krish Naik
Pedestrian Detection using OpenCV from Videos
Krish Naik
Face and Eye Detection from Videos using HAAR Cascade Classifier
Krish Naik
Reading, Writing and Displaying images with Opencv| OpenCV Tutorial
Krish Naik
OpenCV Installation | OpenCV tutorial
Krish Naik
Face and Eye Detection from Images using HAAR Cascade Classifier
Krish Naik
Car Detection using HAAR Cascade and Opencv from Videos.
Krish Naik
Using OpenFace for Face recognition in Keras
Krish Naik
OpenPose Tutorial with Tensorflow
Krish Naik
Multiple Linear Regression using python and sklearn
Krish Naik
Dimensional Reduction| Principal Component Analysis
Krish Naik
Movie Recommender System using Python
Krish Naik
TPR,FPR,FNR,TNR, Confusion Matrix
Krish Naik
Precision, Recall and F1-Score
Krish Naik
Artificial Neural Network for Customer's Exit Prediction from Bank
Krish Naik
GridSearchCV- Select the best hyperparameter for any Classification Model
Krish Naik
RandomizedSearchCV- Select the best hyperparameter for any Classification Model
Krish Naik
K Nearest Neighbor classification with Intuition and practical solution
Krish Naik
K Means Clustering Intuition
Krish Naik
Create custom Alexa Skill- Lambda function- Part2
Krish Naik
Hierarchical Clustering intuition
Krish Naik
Implement Transfer Learning with a generic Code Template
Krish Naik
Gender Classifier and Age Estimator using Resnet Convolution Neural Network
Krish Naik
Unlock Your Application With Your Face using OpenCV
Krish Naik
Draw rectangle from webcam and sketch process it on a live feed
Krish Naik
Complete Life Cycle of a Data Science Project
Krish Naik
How we can apply Machine Learning in Finance
Krish Naik
Deep Learning in Medical Science
Krish Naik
How to switch your career to Data Science.
Krish Naik
Linear Regression Mathematical Intuition
Krish Naik
Handle Categorical features using Python
Krish Naik
Machine Learning Algorithm- Which one to choose for your Problem?
Krish Naik
DBSCAN Clustering Easily Explained with Implementation
Krish Naik
Curse of Dimensionality Easily explained| Machine Learning
Krish Naik
Feature Selection Techniques Easily Explained | Machine Learning
Krish Naik
Tutorial 29-R square and Adjusted R square Clearly Explained| Machine Learning
Krish Naik
Cross Validation using sklearn and python | Machine Learning
Krish Naik
Handling Missing Data Easily Explained| Machine Learning
Krish Naik
Deploy Machine Learning Model using Flask
Krish Naik
Deployment of Deep Learning Model using Flask
Krish Naik
How to Visualize Multiple Linear Regression in python
Krish Naik
K Nearest Neighbour Easily Explained with Implementation
Krish Naik
Predicting Heart Disease using Machine Learning
Krish Naik
Predicting Lungs Disease using Deep Learning
Krish Naik
Stock Sentiment Analysis using News Headlines
Krish Naik
Random Forest(Bootstrap Aggregation) Easily Explained
Krish Naik
Voting Classifier(Hard Voting and Soft Voting Classifier)
Krish Naik
Credit Card Fraud Detection using Machine Learning from Kaggle
Krish Naik
Hyperparameter Optimization for Xgboost
Krish Naik
Tutorial 45-Handling imbalanced Dataset using python- Part 1
Krish Naik
More on: Python for Data
View skill →Related Reads
📰
📰
📰
📰
Classroom vs Online Data Science Training in Hyderabad | Coding MastersClassroom vs Online Data…
Medium · Data Science
SciDraw Alternative: Paper Banana for Scientific Figures
Medium · Data Science
“Missão: Risco da Carteira”.
Medium · Data Science
When Ten Analysts Agree and Two Are Right — What Numbers 13 Knew About Groupthink
Medium · AI
🎓
Tutor Explanation
DeepCamp AI