Goal: pull daily prices via GOOGLEFINANCE, compute monthly closes & returns, and view them in your Sheet.
// Function to serve the HTML file
function doGet() {
return HtmlService.createHtmlOutputFromFile('index');
}
function fetchStockData(ticker, startDateStr) {
var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
// Clear previous data area
sheet.getRange("A1:F1000").clearContent();
// Daily header
sheet.getRange("A1").setValue("Date");
sheet.getRange("B1").setValue("Closing Price");
sheet.getRange("C1").setValue("Stock Name");
// Stock name via GOOGLEFINANCE
var stockNameFormula = '=GOOGLEFINANCE("' + ticker + '", "name")';
sheet.getRange("C2").setFormula(stockNameFormula);
// Daily close via GOOGLEFINANCE
var formula = '=GOOGLEFINANCE("' + ticker + '", "close", "' + startDateStr + '", TODAY(), "daily")';
sheet.getRange("A2").setFormula(formula);
// Wait for formula fill
SpreadsheetApp.flush();
// Collect valid rows
var dataRange = sheet.getRange("A2:B1000").getValues();
var validData = dataRange.filter(function(row){ return row[0] && row[1]; });
if (validData.length === 0) {
return "No data available. Please check the stock ticker and date range.";
}
// Monthly summary headers
sheet.getRange("D1").setValue("Month");
sheet.getRange("E1").setValue("Closing Price");
sheet.getRange("F1").setValue("Monthly Return");
// Keep last close per month
var monthlyData = {};
validData.forEach(function(row){
var date = new Date(row[0]);
var price = row[1];
var monthKey = date.getFullYear() + '-' + String(date.getMonth()+1).padStart(2,'0');
monthlyData[monthKey] = price; // overwrites until last trading day of that month
});
// Write monthly closes + returns
var previous = null;
var r = 2;
Object.keys(monthlyData).sort().forEach(function(monthKey){
var price = monthlyData[monthKey];
sheet.getRange(r, 4).setValue(monthKey); // D
sheet.getRange(r, 5).setValue(price); // E
if (previous !== null) {
var ret = ((price - previous) / previous) * 100;
sheet.getRange(r, 6).setValue(ret.toFixed(2) + "%"); // F
}
previous = price;
r++;
});
return "Data fetched and returns calculated successfully!";
}
index → paste:<!DOCTYPE html>
<html>
<head>
<base target="_top">
<title>Stock Data Fetcher</title>
<style>
body{font-family:Arial,sans-serif;margin:20px;line-height:1.5}
label{display:block;margin-top:10px}
input,button{margin-top:5px}
.footer{margin-top:14px;font-size:12px;color:#666;text-align:center}
</style>
</head>
<body>
<h2>Stock Data Fetcher</h2>
<label for="ticker">Stock Ticker:</label>
<input type="text" id="ticker" placeholder="e.g., AAPL, WMT" />
<label for="startDate" style="margin-top:10px">Start Date:</label>
<input type="date" id="startDate" />
<div style="margin-top:12px;display:flex;gap:8px;flex-wrap:wrap">
<button onclick="fetchData()">Fetch Data</button>
<button onclick="openGoogleSheet()">Open Google Sheet</button>
</div>
<p id="status" style="margin-top:10px"></p>
<script>
function fetchData(){
var ticker = document.getElementById('ticker').value;
var startDate = document.getElementById('startDate').value;
google.script.run.withSuccessHandler(function(resp){
document.getElementById('status').innerText = resp;
}).fetchStockData(ticker, startDate);
}
function openGoogleSheet(){
// Replace with YOUR Sheet URL:
var sheetUrl = "YOUR_GOOGLE_SHEET_URL";
window.open(sheetUrl, "_blank");
}
</script>
<div class="footer">Share your sheet as "Anyone with the link" if collaborators need access.</div>
</body>
</html>
GOOGLEFINANCE.YOUR_GOOGLE_SHEET_URL and set sharing if collaborators test.Deploy a minimal ERC-20 (6 decimals), mint to classmates, import to MetaMask, and submit proof. Testnet only.
ClubStablecoin.sol → paste → compile with Solidity 0.8.20 (or any ^0.8.x).// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
/**
* Club Stablecoin (simple ERC-20 demo)
* - Owner (deployer) can mint and change owner.
* - Anyone can transfer.
* - Anyone can burn their own tokens.
* - Decimals = 6 (dollar-like: 1.000000)
* NOTE: Testnet demo only. Not audited. No fees/pausing/blacklists.
*/
contract ClubStablecoin {
string public name;
string public symbol;
uint8 public immutable decimals;
uint256 public totalSupply;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
address public owner;
modifier onlyOwner(){ require(msg.sender == owner, "not owner"); _; }
event Transfer(address indexed from, address indexed to, uint256 amount);
event Approval(address indexed owner, address indexed spender, uint256 amount);
event OwnershipTransferred(address indexed oldOwner, address indexed newOwner);
constructor(string memory _name, string memory _symbol, uint8 _decimals){
owner = msg.sender;
emit OwnershipTransferred(address(0), msg.sender);
name = _name;
symbol = _symbol;
decimals = _decimals; // e.g., 6 for $-style 1.000000
}
function balanceOf(address a) public view returns (uint256) { return _balances[a]; }
function allowance(address a, address s) public view returns (uint256) { return _allowances[a][s]; }
function transfer(address to, uint256 amount) public returns (bool) {
_transfer(msg.sender, to, amount); return true;
}
function approve(address spender, uint256 amount) public returns (bool) {
_approve(msg.sender, spender, amount); return true;
}
function transferFrom(address from, address to, uint256 amount) public returns (bool) {
uint256 allowed = _allowances[from][msg.sender];
require(allowed >= amount, "insufficient allowance");
if (allowed != type(uint256).max) {
_allowances[from][msg.sender] = allowed - amount;
emit Approval(from, msg.sender, _allowances[from][msg.sender]);
}
_transfer(from, to, amount); return true;
}
function mint(address to, uint256 amount) public onlyOwner {
require(to != address(0), "mint to zero");
totalSupply += amount; _balances[to] += amount;
emit Transfer(address(0), to, amount);
}
function burn(uint256 amount) public {
uint256 bal = _balances[msg.sender]; require(bal >= amount, "insufficient");
_balances[msg.sender] = bal - amount; totalSupply -= amount;
emit Transfer(msg.sender, address(0), amount);
}
function transferOwnership(address newOwner) public onlyOwner {
require(newOwner != address(0), "zero owner");
emit OwnershipTransferred(owner, newOwner); owner = newOwner;
}
function _transfer(address from, address to, uint256 amount) internal {
require(to != address(0), "transfer to zero");
uint256 bal = _balances[from]; require(bal >= amount, "insufficient balance");
_balances[from] = bal - amount; _balances[to] += amount;
emit Transfer(from, to, amount);
}
function _approve(address a, address s, uint256 amount) internal {
require(s != address(0), "approve to zero");
_allowances[a][s] = amount; emit Approval(a, s, amount);
}
}
name: Campus Dollar
symbol: cUSD
decimals: 6
["Campus Dollar","cUSD",6]mint(<memberAddress>, 1000000) to send 1.000000 cUSD (6 decimals).transferOwnership() to pass admin (or move to a Safe multisig later).cUSD and decimals 6 manually.Cross-listed with FIN 310. Credit cannot be awarded for both ECON 310 and FIN 310.
Section: ECON 310 • 103Z • 25FALL
When/Where: TR 12:30–1:45 PM · Room SIJU137
Instructor: Maggie Foley (mfoley3@ju.edu)
Office: DCOBT 118A · Office Hours: Mon–Thu 2–3 PM & by appt.
Money, Banking, and Financial Markets, Cecchetti & Schoenholtz, 6e (2020), McGraw-Hill Irwin. ISBN 978-1260571363.
Lecture integrates textbook, primary sources, and discussion.
| Component | Weight |
|---|---|
| Two Mid-Term Exams | 40% |
| Final Exam | 20% |
| Term Project | 10% |
| Homework | 20% |
| Quizzes (T/F at end of each class; up to 6 misses allowed) | 10% |
Exams: Closed-book/notes; mostly new material but cumulative concepts may reappear.
Quizzes: End of each class; also used for attendance. Up to 6 misses without penalty.
Homework: Due at start of class; legible and done individually unless stated.
Make-ups: With documentation (doctor, coach, Student Life, or university official); notify instructor in advance when possible.
Electronics: Laptops/tablets/phones generally not allowed unless required for an activity.
Extra Credit: Max 5 points across opportunities announced by the instructor.
Unofficial tool to estimate your FIN310 course grade using your Midterms, Final (what-if), Quizzes, Homework, and Term Project.
Enter all scores as percentages (0–100). If quizzes or homework are out of 10 points each, convert to % first (for example 8/10 → 80).
Administered in class (54 T/F; last 4 ungraded). Solution provided as an HTML/JS page.
Administered in class (54 T/F; last 4 ungraded). Study guide and solutions (solutions posted after exam).
Bank basics, regulation, fractional reserve, credit unions, failures.
Administered in class. The Part III portion uses 80 True/False questions covering Sessions 10–17 (commodities & gold, futures & hedging, mutual funds, FX, options, MBS, ABS, money markets & repo). 5 out of the 80 are not graded (75 count toward the score).
Narrative overview, checklists, and exam tips for Sessions 10–17.
Use these for the class MarketWatch game. Open an app, pick candidates in Finviz, then size the trade properly.
MarketWatch game walkthrough
Fundamentals + technical entries, sector mix planner.
Create/join your class game (Virtual Stock Exchange).
Game - FIN310 25 Fall (Live) (have fun)
Intro, short history, role, structure, 2010 chair (Bernanke), JU 2011 visit, videos, mini-quiz.
Fed funds rate, OMOs, discount window, IORB, QE/QT, transmission, statements/minutes, quiz.
Money vs. income/wealth, M0/M1/M2, deposits & money creation, velocity basics, quiz.
Blockchain basics, BTC/ETH, stablecoin types & risks (fiat-backed/crypto/algorithmic), policy, quiz.
Overview of how modern banks operate: balance sheet basics, capital & liquidity, deposit insurance (FDIC), supervision, and lender-of-last-resort. Includes quiz and examples.
U.S. and global bank regulation history (post-2008, post-2018), Basel accords, capital & liquidity rules, stress tests, resolution and “living wills.”
Step-by-step T-accounts, geometric money multiplier, real-world frictions (excess reserves, currency drain, capital limits) and interactive simulator game with quiz.
Structured debates on Too-Big-to-Fail, stablecoins vs banks, “start-a-bank?”, and "what to do if my bank fails tomorrow" scenarios. Students pick sides, reveal explanations, and see final instructor verdicts.
Member-owned credit unions, NCUA insurance, field of membership, and a local case study on VyStar (Jacksonville). Includes eligibility checker, coverage calculator, and quiz.
Hands-on modules focused on instruments, selection frameworks, and hedging. One topic per session.
History (Bretton Woods → 1971), ETF selection (GLD/IAU/GLDM), COMEX futures (GC/MGC), drivers & interactive labs.
Contract specs, margin & P/L, basis & roll, hedge ratios, and case studies (airline fuel, jeweler, exporter).
Share classes, fee math, active vs. passive, factor/sector funds, screening workflow, common pitfalls.
Share classes, fee math, active vs. passive, factor/sector funds, screening workflow, common pitfalls.
Real vs. nominal rate gaps, parity basics, why the USD moves up/down, floating vs. fixed/pegs, why a president (e.g., Trump) might prefer a “weaker dollar,” why stablecoins likely have limited near-term impact on majors, and what that means for the dollar’s future.
Payoffs & Greeks, Black–Scholes intuition, protective puts and zero-cost collars, plus fuel/FX case studies with interactive labs.
Plain-English, one-file, offline module: pick a scenario → get a tool (call/put/protective put/covered call) → test it in the tiny payoff lab.
How a mortgage becomes a bond; pass-throughs; agency vs. non-agency; prepayments & “negative convexity”; TBA trading basics; 2008—what failed and why; today’s watch-outs; and a short debate homework.
One-file app with: Animated cash-flow map Tranche “waterfall” (AAA → Mezz → Equity) ABS in 90s snapshot Who buys & ratings Safety & liquidity Auto-ABS news ’24–’25 Homework (SLABS) — colored & hintable
Where “cash” actually lives: money market funds, T-bills, CDs, commercial paper, and repo (GC vs “specials”), plus the Fed’s ON RRP facility and SOFR. Focus on safety, liquidity, and how these markets transmit monetary policy into everything else.
Simple frameworks and examples to think about portfolio choices (for personal finance interest only).
Quick overview of IRA types and when each might fit. Informational only.