Technical Preparation: Getting Started with Python & Google Colab#

Essential Setup Guide for Your Finance Learning Journey

Why Google Colab + Python for Finance Education?#

The Evolving Landscape#

  • Spreadsheet Modeling: AI enhances productivity in model building

  • Financial Analysis: AI tools accelerate analytical processes

  • Report Writing: AI assists with documentation and insights

  • The Opportunity: Combining traditional skills with modern tools creates competitive advantage

Our Solution: Build, Don’t Just Analyze#

  • Free Tools: Google Colab/Replit - zero barriers to building

  • Ship Fast: No setup time, start creating immediately

  • Optional Public Sharing: You may share your tools for feedback if you want; for this course, a video demo submission is sufficient (no public link required)

  • Portfolio Development: Every session = shippable code

  • AI Partnership: Use AI to build faster, not do homework

  • Survival Skills: Creating > Analyzing in the job market


Getting Started with Google Colab#

Step 1: Access Google Colab#

  1. Go to: colab.research.google.com

  2. Sign in with your Google account (create one if needed)

  3. New Notebook: Click “File → New Notebook” or select from templates

Step 2: Understanding the Interface#

  1. Code Cells: Where you write and run Python code

  2. Output Area: Displays results below each code cell

  3. Menu Bar: File operations, runtime controls, and more

  4. Toolbar: Quick access to common actions (e.g., add cell, run cell)

Step 3: Basic Operations#

  1. Add Cell: Click “+ Code” or “+ Text” buttons

  2. Run Cell: Click play button ▶️ or use Shift+Enter

  3. Edit Cell: Click inside the cell to modify code or text

  4. Delete Cell: Select cell, then Edit → Delete cells

  5. Move Cell: Use ↑ or ↓ icons to reposition cells


Python Finance Essentials#

Python Finance Libraries#

# Financial libraries we'll use in this course
import numpy as np         # For efficient numerical operations
import pandas as pd        # For data analysis and manipulation
import matplotlib.pyplot as plt  # For visualization
import scipy.stats as stats      # For statistical calculations

# Check versions
print(f"NumPy version: {np.__version__}")
print(f"Pandas version: {pd.__version__}")

Your First Financial Calculation#

# Time Value of Money example
principal = 1000    # Initial investment
rate = 0.07         # Annual interest rate (7%)
years = 10          # Time period

# Calculate future value
future_value = principal * (1 + rate) ** years

print(f"An investment of \${principal:,.2f} at {rate:.1%} for {years} years")
print(f"will grow to \${future_value:,.2f}")

# Create a growth visualization
years_range = range(0, years + 1)
values = [principal * (1 + rate) ** year for year in years_range]

plt.figure(figsize=(10, 6))
plt.plot(years_range, values, marker='o', linewidth=2)
plt.title('Investment Growth Over Time', fontsize=15)
plt.xlabel('Years', fontsize=12)
plt.ylabel('Value ($)', fontsize=12)
plt.grid(True)
plt.show()

Tips for Success#

  1. Save Your Work: Colab notebooks save automatically to Google Drive, but download backups

  2. Add Comments: Document your code with explanations using # for single lines

  3. Organize with Markdown: Add text cells for notes and explanations

  4. Sharing is Optional: If you choose to share publicly, control access permissions. For course credit, video-only submissions are enough.

  5. Run in Order: Execute cells in sequence to avoid dependency errors


Quick Troubleshooting#

Common Issues:

  • Runtime Disconnected: Click “Reconnect” if connection is lost

  • Library not Found: Run !pip install library_name to install

  • Variable Errors: Check if you’ve defined all variables before using them

  • Runtime Errors: Select “Runtime → Restart runtime” to clear all variables

Getting Help:

  • Use help(function_name) to view Python documentation

  • Type ?function_name in a cell for quick help

  • Google error messages for community solutions


Resources for Further Learning#

  1. Official Documentation:

  2. Free Learning Resources:


Prompting general instructions#

Working with AI tools like ChatGPT or coding assistants is a skill that improves with practice. The key to success isn’t elaborate “prompt engineering tricks” but rather applying the same critical thinking and structured communication that works in all professional contexts:

Effective Prompting Principles#

  1. Be specific and precise - Clearly define what you’re trying to accomplish rather than asking vague questions

  2. Provide relevant context - Include the necessary background information for the AI to understand your situation

  3. Structure your thinking - Organize your request logically with clear separation between problem statement, constraints, and goals

  4. Ask for reasoning, not just answers - Request explanations of the underlying principles to build your understanding

  5. Iterate and refine - Treat prompting as a conversation where you progressively improve your question based on responses

Example: Poor vs. Effective Prompting#

Poor prompt:

How do I calculate bond value?

Effective prompt:

I'm trying to understand how to calculate the present value of a corporate bond with these characteristics:
- Face value: $1,000
- Annual coupon rate: 5%
- 10 years to maturity
- Market interest rate: 6%

Could you show me the step-by-step calculation process, explain the underlying time value of money principles, and clarify how changes in market interest rates would affect this bond's value?

The effective prompt succeeds because it provides specific parameters, clearly states what kind of explanation is needed, and asks for conceptual understanding rather than just a numerical answer.

Remember: The goal isn’t to “trick” or manipulate AI systems with clever phrasing, but to communicate your needs with the same clarity and precision you would use when asking a human expert for help.

Embracing Rapid Technological Evolution#

It’s crucial to understand that the technology landscape is evolving at lightning speed. Google Colab in 2025 is dramatically different from what it was just a year ago in 2024 - with significant improvements in interface, capabilities, and AI integration. What we’re using today will likely look primitive compared to what will be available during your career.

This course is designed not just to teach you today’s tools, but to prepare you for ongoing technological transformation in finance. Some observations worth noting:

  1. AI integration is accelerating - AI assistants are being embedded directly within data analysis tools, fundamentally changing workflows

  2. Coding is becoming more accessible - Natural language interfaces are making programming increasingly intuitive for finance professionals

  3. Visualization capabilities are advancing - Complex financial data representations that once required specialized skills are becoming automated

  4. Collaboration features are expanding - Real-time shared workspaces with integrated communication are becoming standard

While I can’t predict exactly what tools you’ll be using in five years, I can guarantee they’ll be built on the fundamental principles we’re learning. The core computational thinking and financial logic will remain valuable even as interfaces evolve.

Your mindset should be one of adaptability and continuous learning. The specific syntax or button clicks might change, but your ability to frame financial problems computationally will remain your most valuable skill.

Ready to Build Your Future?#

You’re now equipped with the tools to start building. In Session 1, we’ll learn Time Value of Money (TVM) - not to memorize formulas, but to build tools that apply them.

Remember: Every financial analyst who only analyzes will be replaced by AI. But those who can build financial solutions? They’ll lead the industry.

Your first mini-project ships after Session 2. No excuses. No delays. Build or become obsolete.