Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8635339
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T09:57:02+00:00 2026-06-12T09:57:02+00:00

I would like to ask a completely new question regarding this code . The

  • 0

I would like to ask a completely new question regarding this code.

The code in the link above returns a numpy array for open and close:

open = np.array([q.open for q in quotes]).astype(np.float)
close = np.array([q.close for q in quotes]).astype(np.float)

As per Dan’s help, quotes returns:

In your case you are using asobject=True so the format you get is
date, year, month, day, d, open, close, high, low, volume,
adjusted_close.

Therefore, open and close must be elements [5] and [6] of quotes.

>>> open
array([[ 28.12235692,  28.32908451,  28.482779  , ...,  84.8198783 ,
         84.1401    ,  84.64308037],
       [ 22.49848073,  22.66286426,  22.91112016, ...,  63.66703704,
         64.57105722,  64.12120097]])

and:

>>> close
array([[ 28.5 ,  28.53,  29.23, ...,  83.8 ,  84.99,  83.82],
       [ 22.91,  22.71,  23.53, ...,  63.52,  64.78,  63.92]])
>>> 

I do not understand exacty what open and close represent.

Is each element of open and close all the prices for that specific stock?

Can you please help me to understand exactly what do open and close contain? Are they just lists of lists of prices per symbol per day?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T09:57:04+00:00Added an answer on June 12, 2026 at 9:57 am

    quotes is a list which contains stock information per symbol:

    In [43]: len(quotes)
    Out[43]: 61
    
    In [44]: len(symbols)
    Out[44]: 61
    
    In [45]: symbols
    Out[45]: 
    array(['COP', 'AXP', 'RTN', 'BA', 'AAPL', 'PEP', 'NAV', 'GSK', 'MSFT',
           'KMB', 'R', 'SAP', 'GS', 'CL', 'WAG', 'WMT', 'GE', 'SNE', 'PFE',
           'AMZN', 'MAR', 'NVS', 'KO', 'MMM', 'CMCSA', 'SNY', 'IBM', 'CVX',
           'WFC', 'DD', 'CVS', 'TOT', 'CAT', 'CAJ', 'BAC', 'AIG', 'TWX', 'HD',
           'TXN', 'KFT', 'VLO', 'NWS', 'F', 'CVC', 'TM', 'PG', 'LMT', 'K',
           'HMC', 'GD', 'HPQ', 'DELL', 'MTU', 'XRX', 'YHOO', 'XOM', 'JPM',
           'MCD', 'CSCO', 'NOC', 'UN'], 
          dtype='|S17')
    

    For example the first element in quotes is for the ‘COP’ symbol and contains an array of values by date:

    In [49]: symbols[0]
    Out[49]: 'COP'
    
    In [50]: quotes[0].open
    Out[50]: 
    array([ 13.81001419,  14.01678947,  14.01500099, ...,  56.77238579,
            56.82699428,  56.89080408])
    
    In [51]: quotes[0].date
    Out[51]: 
    array([2003-01-02, 2003-01-03, 2003-01-06, ..., 2007-12-27, 2007-12-28,
           2007-12-31], dtype=object)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to ask a question about a new and large scale web
I would like to ask such question, I have XML xsd`s, which generate beans
i would like to ask a question about @UsesJAXBContext annotation in jax-ws. I try
I would like to ask for more an opinion than a question: What would
I am not sure the best way to ask this question. I am new
This has me completely stumped so I figured I would ask around and see
I would like ask if there's a way to download an android layout from
What I would like ask is best illustrated by an example, so bear with
I would like to ask you: Imagine that you have a site and there
I would like to ask, how can I define class inside another one. In

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.