​+1 (917) 512-9523
99 Wall Street Suite 1672, New York, NY 10005​
[email protected]
 
 
Schedule A Meeting
Investment Science | NYC Consulting Services
  • About
    • Business Consulting in New York
    • The Wealth Almanac​
  • What We Offer
  • Who We Serve
  • Podcast
  • Insights
  • Case Studies
  • Testimonials
  • SageFusion
  • Contact Us
  • About
    • Business Consulting in New York
    • The Wealth Almanac​
  • What We Offer
  • Who We Serve
  • Podcast
  • Insights
  • Case Studies
  • Testimonials
  • SageFusion
  • Contact Us

Insights

Free Consultation

Checking Google Trends For Investments

4/9/2022

0 Comments

 
Picture


​While many individuals leverage google trends for markets such as ecommerce to see which products to sell, there are various other variations in which google trends could be quite useful in regards to researching investments. For individuals seeking to learn how to leverage google trends, it is vital for he or she to understand that one first must pick a programming language. For the purpose of this article, we chose to use the python programming language. Some of the benefits in regards to python are it's simple to use, quick to code, and fewer lines of code. Some of the drawbacks are it's interpreted language in nature, which means the code takes longer to run than say Java, but this could be resolved with Apache Flink or Apache Spark, which convers the code into the JVM, and is out of scope for this tutorial.. When writing code, it's vital for one not to fall in love with a programming language. Now, we get into utilizing python for google trends pertaining to investments.

Steps:

1) Download Pycharm -> https://www.jetbrains.com/pycharm/download/#section=windows
2) Install Anaconda -> https://www.anaconda.com/products/distribution
3) Run the source code below, and replace the ticker symbol with a new ticker symbol:

# import the TrendReq method from the pytrends request module
from pytrends.request import TrendReq
from pylab import *
# execute the TrendReq method by passing the host language (hl) and timezone (tz) parameters
pytrends = TrendReq(hl='en-US', tz=360)
# build list of keywords
kw_list = ["AAPL"]
# build the payload
pytrends.build_payload(kw_list, timeframe='2021-02-22 2022-02-22', geo='US')

# plot all three trends in same chart


# store interest over time information in df
df = pytrends.interest_over_time()
# display the top 20 rows in dataframe
print(df.head(20))
df.plot()
show()

Legal Disclaimer:

This post does not constitute an endorsement for an investment, does not reflect the opinions of any Investment Sciences' clients or affiliates, and is solely for educational purposes only.

get help with Python Development
0 Comments

    Author

    Michael Kelly has been working within banking technology for over a decade, and his experience spans across algorithmic trading, project management, product management, alternative finance, hedge funds, private equity, and machine learning. This page is intended to educate others across interesting topics, inclusive of finance.

    Archives

    May 2025
    March 2025
    February 2025
    January 2025
    October 2024
    August 2024
    July 2024
    June 2024
    May 2024
    January 2024
    November 2023
    August 2023
    June 2023
    February 2023
    January 2023
    December 2022
    November 2022
    July 2022
    June 2022
    May 2022
    April 2022
    March 2022
    January 2022
    December 2021
    November 2021
    October 2021
    September 2021
    July 2021
    May 2021
    April 2021
    March 2021
    February 2021
    January 2021
    December 2020
    November 2020
    September 2020
    August 2020

    Categories

    All
    Agile Project Management
    Artificial Intelligence
    Change Management
    Compliance
    Data Science
    Disruptive Innovation
    Economic Analysis
    Education Training
    Financial Education
    Lending
    Marketing
    Natural Language Processing
    Portfolio Management
    Real Estate
    Technology Strategy
    Trading Research
    Venture Capital
    XBRL

    RSS Feed

Picture
WHAT WE OFFER  /  WHO WE SERVE  /  ABOUT /  PODCAST  /  INSIGHTS  /  CASE STUDIES  /  TESTIMONIALS  /  SAGEFUSION   /  CONTACT US  
OUR OFFICE
SAY HELLO
If you are interested in working with us or ​just want to say hello simply drop us a line!

Email: [email protected]
Phone: ​+1 (917) 512-9523
​
RESERVE TIME
OUR INSIGHTS
Stay up to date with our latest content from our insights page.
Subscribe To Our Insights
  © 2024 Investment Science, LLC  |  All Rights Reserved  | Buy Our Book | Legal Statement