Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Stock Return calculation problem
Post: RE: Stock Return calculation problem

(Sep-26-2022, 03:24 PM)deanhystad Wrote: Verify it yourself. pct_change = percent_change(portfolio, "2013-01-01", "2013-01-10") print(pct_change) # Or just print a slice pct_change[:10] weighted_ch...
LFin General Coding Help 10 2,166 Sep-26-2022, 03:36 PM
    Thread: Stock Return calculation problem
Post: RE: Stock Return calculation problem

(Sep-24-2022, 11:11 AM)deanhystad Wrote: If you want the percent change for each day I would do this: import pandas_datareader as web import pandas as pd #Enter the stocks you want to use as variab...
LFin General Coding Help 10 2,166 Sep-26-2022, 01:59 PM
    Thread: Stock Return calculation problem
Post: RE: Stock Return calculation problem

(Sep-24-2022, 08:14 AM)perfringo Wrote: (Sep-23-2022, 06:46 PM)LFin Wrote: I totally understand and I did it, exactly what you wrote in the first time but as I am going to use different weights (w...
LFin General Coding Help 10 2,166 Sep-26-2022, 01:52 PM
    Thread: Stock Return calculation problem
Post: RE: Stock Return calculation problem

(Sep-23-2022, 11:23 AM)perfringo Wrote: You could significantly simplify your code. Get rid of the repetition, put tickers into list/tuple and iterate over them: tickers = ("BRK-B", "AMZN", "AAPL",...
LFin General Coding Help 10 2,166 Sep-23-2022, 06:46 PM
    Thread: Stock Return calculation problem
Post: Stock Return calculation problem

Hello, I am trying to solve a portfolio management kind of exercise and I don't know what is wrong in my code. I am a beginner in Python but I know how to code in VBA so I've more this style to writ...
LFin General Coding Help 10 2,166 Sep-22-2022, 02:13 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020