44import pandas as pd
55import numpy as np
66import matplotlib .pyplot as plt
7+ from matplotlib .axes import Axes
78
89from scipy .optimize import minimize
910
@@ -940,7 +941,7 @@ def get_monte_carlo(self, n: int = 100, kind: str = "mean") -> pd.DataFrame:
940941 random_portfolios = helpers .Frame .change_columns_order (random_portfolios , ["Risk" , second_column ])
941942 return random_portfolios
942943
943- def plot_transition_map (self , x_axe : str = "risk" , figsize : Optional [tuple ] = None ) -> plt . axes :
944+ def plot_transition_map (self , x_axe : str = "risk" , figsize : Optional [tuple ] = None ) -> Axes :
944945 """
945946 Plot Transition Map for optimized portfolios on the single period Efficient Frontier.
946947
@@ -960,12 +961,6 @@ def plot_transition_map(self, x_axe: str = "risk", figsize: Optional[tuple] = No
960961
961962 Parameters
962963 ----------
963- bounds : tuple of ((float, float),...)
964- Bounds for the assets weights. Each asset can have weights limitation from 0 to 1.0.
965- If an asset has limitation for 10 to 20%, bounds are defined as (0.1, 0.2).
966- bounds = ((0, .5), (0, 1)) shows that in Portfolio with two assets first one has weight limitations
967- from 0 to 50%. The second asset has no limitations.
968-
969964 x_axe : {'risk', 'cagr'}, default 'risk'
970965 Show the relation between weights and CAGR (if 'cagr') or between weights and Risk (if 'risk').
971966 CAGR or Risk are displayed on the x-axis.
@@ -1013,7 +1008,7 @@ def plot_transition_map(self, x_axe: str = "risk", figsize: Optional[tuple] = No
10131008 fig .tight_layout ()
10141009 return ax
10151010
1016- def plot_pair_ef (self , tickers = "tickers" , figsize : Optional [tuple ] = None ) -> plt . axes :
1011+ def plot_pair_ef (self , tickers = "tickers" , figsize : Optional [tuple ] = None ) -> Axes :
10171012 """
10181013 Plot Efficient Frontier of every pair of assets.
10191014
@@ -1089,7 +1084,7 @@ def plot_pair_ef(self, tickers="tickers", figsize: Optional[tuple] = None) -> pl
10891084 self .plot_assets (kind = "mean" , tickers = tickers )
10901085 return ax
10911086
1092- def plot_cml (self , rf_return : float = 0 , y_axe : str = "cagr" , figsize : Optional [tuple ] = None ) -> plt . axes :
1087+ def plot_cml (self , rf_return : float = 0 , y_axe : str = "cagr" , figsize : Optional [tuple ] = None ) -> Axes :
10931088 """
10941089 Plot Capital Market Line (CML).
10951090
0 commit comments