Skip to content

Commit

Permalink
Automated formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jul 22, 2023
1 parent 92ca47c commit 917b140
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 10 deletions.
3 changes: 2 additions & 1 deletion example/Example-Analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@

# <codecell>

import datetime
import pathlib

import matplotlib.pyplot as plt
import pandas as pd
import datetime

# importing FinQuant's function to automatically build the portfolio
from finquant.portfolio import build_portfolio
Expand Down
3 changes: 2 additions & 1 deletion example/Example-Build-Portfolio-from-file.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@

# <codecell>

import datetime
import pathlib

import pandas as pd
import datetime

# importing FinQuant's function to automatically build the portfolio
from finquant.portfolio import build_portfolio
Expand Down
3 changes: 2 additions & 1 deletion example/Example-Build-Portfolio-from-web.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@

# <codecell>

import pandas as pd
import datetime

import pandas as pd

# importing some custom functions/objects
from finquant.portfolio import build_portfolio

Expand Down
3 changes: 2 additions & 1 deletion example/Example-Optimisation.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@

# <codecell>

import datetime
import pathlib

import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import datetime

# importing FinQuant's function to automatically build the portfolio
from finquant.portfolio import build_portfolio
Expand Down
6 changes: 4 additions & 2 deletions finquant/asset.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ class Asset:
"""

def __init__(self, data: pd.Series, name: str, asset_type: str = 'Market index') -> None:
def __init__(
self, data: pd.Series, name: str, asset_type: str = "Market index"
) -> None:
"""
:Input:
:data: ``pandas.Series``, of asset prices
Expand Down Expand Up @@ -119,4 +121,4 @@ def properties(self):
def __str__(self):
# print short description
string = f"Contains information about {self.asset_type}: {self.name}."
return string
return string
3 changes: 2 additions & 1 deletion finquant/market.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import numpy as np
import pandas as pd

from finquant.asset import Asset
from finquant.returns import daily_returns, historical_mean_return

Expand Down Expand Up @@ -43,4 +44,4 @@ def comp_daily_returns(self) -> pd.Series:
"""Computes the daily returns (percentage change) of the market index.
See ``finquant.returns.daily_returns``.
"""
return daily_returns(self.data)
return daily_returns(self.data)
2 changes: 1 addition & 1 deletion finquant/portfolio.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
- Individual stocks of the portfolio (Expected Return over Volatility)
"""

from typing import List
import datetime
from typing import List

import matplotlib.pylab as plt
import numpy as np
Expand Down
4 changes: 2 additions & 2 deletions finquant/stock.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

import numpy as np
import pandas as pd

from finquant.asset import Asset
from finquant.returns import daily_returns, historical_mean_return

Expand All @@ -45,7 +46,6 @@ class Stock(Asset):
"""


def __init__(self, investmentinfo: pd.DataFrame, data: pd.Series) -> None:
"""
:Input:
Expand Down Expand Up @@ -93,4 +93,4 @@ def properties(self):
string += "\nInformation:"
string += "\n" + str(self.investmentinfo.to_frame().transpose())
string += "\n" + "-" * 50
print(string)
print(string)

0 comments on commit 917b140

Please sign in to comment.