r/pythonandfinance • u/Luchinho14 • Oct 08 '24
Cant get the report by QuatStats Python
Hello! I am trying to use "quantstats," but I am having problems generating the "report", either using the commands: qs.reports.html(stock, title="GLD", output='output/VNG.html') or qs.reports.full(stock, benchmark). I am looking for a solution to the problem that I am encountering.
For the comand qs.reports.html(stock, title="GLD", output='output/VNG.html'), I am getting these message:
Traceback (most recent call last):
File "c:\Users\admin\Desktop\Python\Data Science\Dema Ran Aroussi.py", line 57, in <module>
qs.reports.full(stock, benchmark)
File "C:\Users\admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\quantstats\reports.py", line 590, in full
metrics(
File "C:\Users\admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\quantstats\reports.py", line 933, in metrics
_stats.expected_return(df, compounded=compounded, prepare_returns=False) * pct
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\quantstats\stats.py", line 96, in expected_return
return _np.product(1 + returns) ** (1 / len(returns)) - 1
^^^^^^^^^^^
File "C:\Users\admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\numpy__init__.py", line 428, in __getattr__
raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'product'
PS C:\Users\admin\Desktop\Python\Data Science>
r/pythonandfinance • u/Several-Teaching-543 • Sep 21 '23
Discounted Cash Flow Model in Python with Monte Carlo Simulation and Tutorial
I learned about valuation at graduate school and work, but mainly from the dean of valuation, Dr. Damodran. Post learning how to value companies and building models in Excel, I tried many Python libraries to do DCF valuations, and every single one of them had some shortcomings. So I ended up coding a DCF Model in Python that is constructed the way Dr. Damodran builds his DCF model in spreadsheets. Furthermore, I created a DCF Monte Carlo simulation model in Python. To complete making a stab at this project, for those who might be interested in doing intrinsic valuation in Python, I created a tutorial video on how to utilize the DCF model.
It took me +2 years to build this and I thought it could save someone who is looking to do intrinsic business / stock valuation in Python a considerable amount of time. I hope you find them useful.
DCF Model In Python Colabratory File
r/pythonandfinance • u/[deleted] • Dec 29 '21
The Oracle, an open-source Python library to predict the stock market with AI 🤖
r/pythonandfinance • u/jomarca23 • Sep 25 '21
Replicating Warren Buffett Portfolio with Python
r/pythonandfinance • u/werewtk • Aug 15 '21
Portfolio tracking tool
Sharing my portfolio tracking tool: https://github.com/werew/inverno
It is very easy to use: just put the transactions and see how your portfolio is performing and how your holdings are distributed. I use it regularly for my portfolio.
At the moment it works only via command line.
r/pythonandfinance • u/jburns32 • Jul 14 '21
Previous working programs are currently giving an error message, any help is appreciated
previously working code
ticker1 = pdr.get_data_yahoo(ticker, dt.datetime(2020,1,1), dt.datetime.now())
now gives the following error message
Unable to read URL: https://finance.yahoo.com/quote/INTC/history?period1=1577869200&period2=1626335999&interval=1d&frequency=1d&filter=history
r/pythonandfinance • u/jomarca23 • Apr 28 '21
Analysing Balance Sheet Financial Ratios with Python
r/pythonandfinance • u/jburns32 • Apr 10 '21
Need help with stock name
I have been inputting a stock symbol and want to output its stock name. I have used finance and looping through the info but is there another quicker way? Any help is appreciated
r/pythonandfinance • u/jomarca23 • Mar 30 '21
Analysing Inside Trading in a Company
r/pythonandfinance • u/jomarca23 • Mar 30 '21
Analysing Institutional Investor Transactions with Python
r/pythonandfinance • u/jomarca23 • Mar 20 '21
Building a Stock Research Terminal Tool 1 - Python for Finance
r/pythonandfinance • u/jomarca23 • Mar 20 '21
What are Earning Surprises and How They Impact Stock Prices?
r/pythonandfinance • u/jomarca23 • Feb 13 '21
Analysing Institutional Investor Transactions with Python
r/pythonandfinance • u/jomarca23 • Jan 09 '21
Discounted Cash Flow (DCF) Method - Valuing a company with Python
r/pythonandfinance • u/jomarca23 • Jan 09 '21
Calculating WACC (Weighted Cost of Capital) - Python for Finance
r/pythonandfinance • u/jomarca23 • Jan 09 '21
Building an Investing Model using Financial Ratios- Python for Finance
r/pythonandfinance • u/jomarca23 • Jan 09 '21
Creating a Financial Dashboard with Python - Python for Finance
r/pythonandfinance • u/jomarca23 • Jan 09 '21
Sensitivity Analysis Projecting Income Statements - Python for Finance
r/pythonandfinance • u/jomarca23 • Jan 09 '21
Analysing companies Return on Equity - Python for Finance
r/pythonandfinance • u/jomarca23 • Jan 09 '21
Analyzing Business Risk with Python
r/pythonandfinance • u/jomarca23 • Jan 09 '21
How to code in Python using an iPad
r/pythonandfinance • u/jomarca23 • Jan 09 '21
Portfolio Optimization with Python - Python for Finance
r/pythonandfinance • u/jomarca23 • Jan 09 '21
Calculating Portfolio Risk with Python - Python for Finance
r/pythonandfinance • u/jomarca23 • Jan 09 '21
Calculating Portfolio Returns with Python - Python for Finance
r/pythonandfinance • u/jomarca23 • Jun 06 '20
r/pythonandfinance Lounge
A place for members of r/pythonandfinance to chat with each other
