Welcome to The Portfolio Manager’s Guide to Python, your comprehensive resource for mastering Python in the financial world. Our goal is to accelerate your Python journey, enabling you to leverage its power in your portfolio management strategies. Our subscription offers a triad of specialized services:
JupyterLab isn’t just an IDE; it’s a workspace that brings your financial models to life. Built atop the IPython kernel, JupyterLab supports multiple languages including R, Julia, and Haskell, via additional kernels. The platform seamlessly blends code execution with data visualization and documentation, making it an indispensable tool for data-driven portfolio management.
As a PM’s Guide subscriber, every lesson and code snippet is available directly within JupyterLab. No more passive learning from static web pages. Feel free to experiment with the code, modify it, and integrate it into your trading algorithms. To begin, simply navigate to any article on PM’s Guide and click “Open in JupyterLab” to load the lesson in your cloud-based JupyterLab environment.
To get you up and running, here are some simple steps:
Now you’re all set to commence your Python journey in the realm of portfolio management!
import datetime import yfinance as yf msft = yf.Ticker("MSFT") df_prices = msft.history(start=datetime.date.today() - datetime.timedelta(days = 365), end=datetime.date.today()) df_prices.head() # Show the first five rows of the DataFrame
from datetime import datetime import pandas as pd import plotly.graph_objects as go df = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/finance-charts-apple.csv') fig = go.Figure(data=[go.Candlestick( x=df['Date'], open=df['AAPL.Open'], high=df['AAPL.High'], low=df['AAPL.Low'], close=df['AAPL.Close'])]) fig.update_layout(title='AAPL Candlestick Chart', width=300) fig.show()
Our JupyterLab environment is not just another coding interface—it’s a window into the real-world tools and techniques employed by Portfolio Manager Jason Chen. Think of it as a virtual apprenticeship in finance, where you gain access not just to a rich set of libraries, but also to Jason’s proprietary code snippets and tools that are used for daily portfolio management tasks.
What sets our JupyterLab environment apart is its focus on practical, industry-relevant tools. Every line of code, every pre-installed package, and even the structure of the environment is optimized for the specific needs of financial portfolio management.
For example, you can quickly generate the ADX Trend Strength Indicator, a commonly used technical analysis indicator, using pre-loaded code snippets. The ADX indicator is crucial for understanding market conditions and can be pivotal in your trading decisions.
import pandas_ta df_signals = df_prices.ta.adx() df_signals.tail() # show the last five rows
Quick Links