Category "finance"

Creating a regression summary table with multiple regressions, adding 1 independent variable at a time (R/Python)

I would like to know, whether there is a pre-built function / package which does a simply OLS regression, by adding one independent variable from a pre-defined

What is the problem with inserting dividend from finviz.com to Google sheets?

I use this formula to get dividend: =IfError(IF(isblank(A2),"", substitute(index(IMPORTHTML("http://finviz.com/quote.ashx?t="&A2,"table", 8),7,2),"*","")),0

How to divide a groupby Object by pandas Series efficiently? Or how to convert yfinance multiple ticker data to another currency?

I am pulling historical price data for the S&P500 index components with yfinance and would now like to convert the Close & Volume from USD into EUR. Thi

backtrader: custom columns as indicator

import backtrader.feeds as btfeeds class PandasDataSource(bt.feeds.PandasData): lines = ('Strategy_GoldenCross_Signal',) params=( ('Strate

Error with a python string to dateconversion using Pandas

I'm struggling to change the format of the dates of my dataframe. I get the following error: ValueError: to assemble mappings requires at least that [year, mont

Python Finance: get_data_yahoo Not Retrieving Data

I ran this code about a year ago and it was working fine. Now it has stopped working, and I think it has to do with the get_data_yahoo function. Here is part

Trying to copy an LSTM code, giving me an error "x and y must have same first dimension, but have shapes (1103,) and (275,)"

I'm trying to copy a LSTM model that I found from here: Stock Market-Predict volume with LSTM model I'm getting stuck on the last line of code. Specifically, th

How to create a Crypto wallet for a start up(Bitcoin and Ethereum)?

I have beginner skills as Full stack Developer and am looking to help developing a crypto wallet with a small start up. The idea is to create a wallet that will

Calculate NPV for cashflows at all point in time

I have the following data frame contains cash flows for several items. For example: test <- data.frame(ID = c(rep("A",3), rep("B",4)), time = c("y3

Finding a specific element in a matrix with set parameters

I created a code for financial options and there is one last thing missing to finish it. I want my code to find the implied volatility for a specific option. My

Historical Yahoo Finance API On Fritz Again?

I've been successfully using the Yahoo Finance API cookie/crumb technique to get historical stock quotes for many years. On April 28th, 2022, it broke, and exc

Get the rate of change by finding the change in price

UPDATE: I'm getting a strange result in the outcome. Occasionally, the earliest date of the result show after 2 or 3 etc times for example Item Kg Date_1 Price

Excel XIRR Function returning invalid calculation

When running the XIRR function "=XIRR(G163:G168,F163:F168)" where the cashflow is in G163:G168 and my dates are in F163:F168, excel is returning a value of .000

How do I get quarterly S&P500 constituents in Python from the detailed change data?

I want to use S&P500 company information to calculate an index. However, the companies in S&P500 changes frequently, I want to know the constituents for

drawing a binomial tree in latex with python

I want to have some code that draws a binomial tree (for finance) for how ever many periods I give it. \documentclass{article} \usepackage{tikz} \usetikzlibrary

Get info on multiple stock tickers quickly using yfinance

I am trying to get the current price and market cap of all of the tickers in the S&P500 and the way I am currently doing it is very slow, so I was wondering