Python Forum
Multiply Two Time Series: Not Working
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Multiply Two Time Series: Not Working
#1
Hi folks,

I am trying to multiply two time series shown below with the following command but the output is NaN.

Can someone help me?
Output:
Command>>print (portfolio.positions*portfolio.bars[['Adj Close']]) Output>> AAPL Adj Close Date 1990-01-02 NaN NaN 1990-01-03 NaN NaN 1990-01-04 NaN NaN 1990-01-05 NaN NaN ... ... ... =========================================================================================== Data for portfolio.positions as follow AAPL Date 1990-01-02 0.0 ... 2001-11-20 0.0 [3028 rows x 1 columns] =========================================================================================== Data for portfolio.bars as follow High Low ... Volume Adj Close Date ... 1990-01-02 1.339286 1.250000 ... 45799600.0 0.121996 ... ... ... ... ... 2001-12-31 1.618571 1.559286 ... 34445600.0 1.043070 [3028 rows x 6 columns] ===========================================================================================
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Date Time Series Help...Please spra8560 2 312 Feb-01-2024, 01:38 PM
Last Post: spra8560
  Print names in x-axis of a time-series values hobbyist 4 1,176 Apr-22-2023, 09:29 PM
Last Post: deanhystad
  Time series JasminQuinn 0 1,005 Apr-22-2022, 10:33 PM
Last Post: JasminQuinn
  How to read rainfall time series and insert missing data points MadsM 4 2,123 Jan-06-2022, 10:39 AM
Last Post: amdi40
  Real Time Audio Processing with Python Sound-Device not working Slartybartfast 2 3,880 Mar-14-2021, 07:20 PM
Last Post: Slartybartfast
  Plotting A Time Series With Shaded Recession Bars adamszymanski 1 3,117 Jan-24-2021, 09:08 PM
Last Post: nealc
  Getting the hourly average of a time series dataset Raskou07 10 12,315 Dec-15-2020, 12:51 PM
Last Post: palladium
  Tableau Time Series Prediction using Python Integration tobimarsh43 0 1,887 Jul-24-2020, 10:38 AM
Last Post: tobimarsh43
  Bode plot from time series experiment data discus 4 7,209 Jun-20-2020, 07:46 AM
Last Post: discus
  Convert quarterly time series to monthly time series donnertrud 1 5,099 May-22-2020, 10:16 AM
Last Post: pyzyx3qwerty

Forum Jump:

User Panel Messages

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