### Install thepassiveinvestor Package Source: https://www.jeroenbouma.com/projects/thepassiveinvestor/index This command installs the 'thepassiveinvestor' Python package using pip. Ensure you have pip installed and updated for the latest version. ```bash pip install thepassiveinvestor ``` -------------------------------- ### Compare ETFs using thepassiveinvestor Source: https://www.jeroenbouma.com/projects/thepassiveinvestor/index This Python code demonstrates how to collect and compare data from a list of Exchange Traded Funds (ETFs). It utilizes the 'collect_data' function from the 'thepassiveinvestor' library, specifying a list of ETF tickers and setting the 'comparison' argument to True to generate a comparison report. ```python import thepassiveinvestor as pi # Collect data from a set of ETFs and compare them etf_comparison = pi.collect_data(['VOO', 'QQQ', 'ARKG', 'VUG', 'SCHA', 'VWO'], comparison=True) ``` -------------------------------- ### Import thepassiveinvestor Package in Python Source: https://www.jeroenbouma.com/projects/thepassiveinvestor/index This Python code snippet imports the 'thepassiveinvestor' package, aliasing it as 'pi' for easier use in subsequent code. This is a standard practice for simplifying module access. ```python import thepassiveinvestor as pi ``` -------------------------------- ### Collect ETF Data using thepassiveinvestor Source: https://www.jeroenbouma.com/projects/thepassiveinvestor/index This Python code demonstrates how to use the 'collect_data' function from the 'thepassiveinvestor' package to retrieve key information for a specific ETF, identified by its ticker symbol 'VOO'. The collected data is stored in the 'vanguard_sp500' variable. ```python import thepassiveinvestor as pi # Collect data from a specific ETF vanguard_sp500 = pi.collect_data('VOO') ``` -------------------------------- ### Display ETF Comparison Data Source: https://www.jeroenbouma.com/projects/thepassiveinvestor/index This function displays a comparison of various ETFs, showing sector holdings, annual returns, key characteristics, and risk data over different periods (3y, 5y, 10y). It takes a list of ETF tickers as input and outputs a formatted table. ```python import thepassiveinvestor as pi etf_comparison = pi.etf_comparison() print(etf_comparison) ``` -------------------------------- ### Generate ETF Report to Excel Source: https://www.jeroenbouma.com/projects/thepassiveinvestor/index This function generates an Excel report containing key information for a list of ETFs. It takes a list of ETF tickers and an output filename as arguments. The generated Excel file provides a consolidated view of relevant ETF data. ```python import thepassiveinvestor as pi # Create a report from a list of ETFs etf_list = ['VOO', 'QQQ', 'ARKG', 'VUG', 'SCHA', 'VWO'] pi.create_ETF_report(etf_list, 'Popular ETFs.xlsx') ``` -------------------------------- ### Display Vanguard S&P 500 Data Source: https://www.jeroenbouma.com/projects/thepassiveinvestor/index This code snippet retrieves and displays comprehensive data for the Vanguard 500 Index Fund. It includes information such as fund summary, sector and company holdings, annual returns, and risk data. The output is a dictionary containing these details. ```python import thepassiveinvestor as pi vanguard_sp500 = pi.vanguard_sp500 print(vanguard_sp500) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.