Python Forum
error on stock indicator code on balance volume
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
error on stock indicator code on balance volume
#12
Do you need the OBV_1 column inside the on_balance_volume()?
Because it is being added only at the end of the function.

Here, after the on_balance_volume(), it is there:

aapl = on_balance_volume(aapl, n)
print(aapl.index)
print(aapl.columns)
print(aapl['OBV_1'])
Output:
RangeIndex(start=0, stop=17, step=1) Index(['Date', 'Open', 'High', 'Low', 'Close', 'Adj Close', 'Volume', 'OBV_1'], dtype='object') 0 0.0 1 88102700.0 2 123432400.0 3 -138040000.0 4 -119282800.0 5 119282800.0 6 -115557400.0 7 -148614900.0 8 148614900.0 9 -108223500.0 10 -148516900.0 11 148516900.0 12 -153038200.0 13 -152038600.0 14 -220441900.0 15 220441900.0 16 266424900.0 Name: OBV_1, dtype: float64
Reply


Messages In This Thread
RE: error on stock indicator code on balance volume - by gontajones - Jul-06-2018, 09:51 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to accumulate volume of time series amdi40 3 2,391 Feb-15-2022, 02:23 PM
Last Post: amdi40
  Integrating for the volume of a torus in SciPy Nitram 2 3,757 Jan-08-2020, 04:45 PM
Last Post: Nitram

Forum Jump:

User Panel Messages

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