What are the advantages of NumPy over regular Python lists?

What are the advantages of NumPy over regular Python lists? I have approximately 100 financial markets series, and I am going to create a cube array of 100x100x100 = 1 million cells. I will be...

Numpy financial calculating saving plan

I want to save $1.000.000. How much do I need to save monthly with yearly interest rate of 4% for 5 years? Is there simple numpy financial function to calculate this, or do I need to do it "manually"?

NumPy: financial irr method returns 'nan'. Why?

When I calculate the Internal Rate of Return (irr) using the numpy method irr, I receive nan as return. In [45]: numpy.irr([-10, 2, 2, 2, 2]) Out[45]: nan Shouldn't the results be at least...

How to convert pandas PeriodIndex into a specific financial year string format?

I'm looking to use a periodIndex series and to create a new series that displays the current financial year in this format 'yyyy/yy'. For example using the UK financial year as an example - >...

Is there a matrix (numpy) equivalent to these recursive equations?

I have the following recursive equations I want to implement in Python (the background is financial markets): This is easily done sequentially, using a loop: def compute(x, y, χ, γ, a0, b0): ...

Python codes using numpy and matplotlib without outputting result

I just started learning doing financial analytics with python today. I ran into a block of code and it requires importing numpy and matplotlib to run the codes and generate a graph(not sure if it...

Numpy reshape from (m,w,l) to (w,m,l) dimension

I'm working with financial time series data and a bit confused with numpy reshape function. My goal is to calculate log-returns for adj_close parameter. inputs =...

Unable to run the Numpy.nper function in JupyterLab

A hint that something was incorrect was when Jupyter does not show a signture for the numpy.nper function ("Signature: numpy.nper(args, *kwds)") I go ahead and fill the arguments with the...

Itereting over an API with Json,

import requests import json import numpy as np import pandas as pd url = "https://financialmodelingprep.com/api/v3/financial-statement-growth/PETS" JC = requests.get(url).json() content =...

Calculate IRR in Python

I am running into a roadblock and would appreciate some help on this. Problem Statement: I am trying to calculate XIRR for a cash flow over 30 years in Python. What have I tried so far:...

Calculating XIRR in Python

I need to calculate XIRR of financial investments made over a period of time. Is there any function to do this in numpy, pandas or plain python? Reference: What is XIRR? The accepted answer in the...

Financial Calculator: How Can I properly store the inputs int N, I/Y, PMT, PV, and FV buttons to later perform a TVM calculation using Numpy?

So the regular calculator functions work fine, but I am trying to add a Time Value of Money Calculator to it. Basically, I want to be able to press a number, then store it in one of the buttons...

Distribution of time series data in TensorFlow

I currently have a kdb+ database with ~1mil rows of financial tick data. Using Python3, TensorFlow, and numpy, what is the best way to break up time-series financial data into train/dev/test...

Numpy Arrays and Gtk ListStores

I'd like to discuss some general decisions I have to make for my little project. It's mostly concerning the memory consumption, but also data integrity. It is an accounting tool, having a list of...

how to install numpy and pandas on windows

I'll preface by saying I'm a programming n00b by stack standards. I have experience with data analysis and scripting -- this is what I do professionally at a financial firm -- but I have no idea...

Pandas DataFrame Slicing issue

To backtest financial data I've written an algorithm, I have code as following: import pandas as pd import numpy as np import datetime from datetime import datetime from...

How to calculate future value of investment with Pandas when interest rates and payments vary over time?

Let's assume that I would like to know how the value of my invested money changes over time. I have the following data in Pandas DataFrame: contribution monthly_return 2020-01-01 ...

How to view code of predefined library functions in Python libraries?

I use Quantlib and other packages for building a library of valuation models for derivative financial instruments in Python. Some of the pre-defined functions I use a lot. I would like to...

Python - How to output matplotlib plots as images to the browser in Django

I'm using Python- Pandas, Numpy to implement some financial indicators and strategies. I'm also using the Matlab library in Python to plot my data. On the other hand, I'm using Django for the...

Python Dictionary on Financial Literacy

In the given code I am working on financial planning. that involves a financial literate (fl) person and not a financial literate person (nfl). I have to calculate their balance after 40 years of...

Merging Financial Data

I am trying to figure out how to take the financial information(income statement, balance sheet, and cash flow from yahoo finance. I have a list called symbols which has all the ticker numbers...

The reading list for scientific programmer

I am working to become a scientific programmer. I have enough background in Math and Stat but rather lacking on programming background. I found it very hard to learn how to use a language for...

Python: TypeError: '>' not supported between instances of 'numpy.ndarray' and 'int'

Code description: I am trying to calculate various rolling metrics on financial time series data. I am using a looped approach as I would like to simulate data coming in from an API. My original...

Can't assign a numpy array to pandas dataframe

I'm unable to assign a numpy array from a tuple of numpy arrays to a pandas dataframe. Can someone help me? I'm using a third party library to fetch the data and to produce the output numpy...

How best to hold 1000 different data series using TimeSeries module in Python?

I want to create a massive TimeSeries object which will hold 1000 different financial markets data series, each storing 1500 daily-data points. I'm quite new to the TimeSeries module and am a...

Can you install numpy_financial from Anaconda instead of pip?

The financial functions of numpy have been deprecated and will be removed from future versions. They are now part of a new package called numpy_financial. I understand it can be installed with...

How can I apply a couple of functions to multiple tickers in a list? (Code improvement)

So I'm currently learning how to analyse financial data in python using numpy, pandas, etc... and I'm starting off with a small script that will hopefully rank some chosen equities by the price...

Human readable alternative to CSV

Are there any formats for tables that are more readable than CSV and have good programming language support? I need to store some financial information in Git for auditing, and I want commit diffs...

cannot import zipline package after successful conda installation

>python version -3.5.6 <br /> >using anaconda, c++build tools are installed <br /> >pip install zipline works perfectly<br /> >import zipline # gives error below<br /> (myenv) c:\users>>>pip show...

Unnestling a dictionary into a Pandas DataFrame

I am downloading financial data, that comes in dictionaries within lists in Python looking like this: [{&#39;complete&#39;: True, &#39;volume&#39;: 2, &#39;time&#39;:...