Skip to content

Instantly share code, notes, and snippets.

View dmastylo's full-sized avatar

Damian Mastylo dmastylo

View GitHub Profile
Po = D / (1 + required return) + P1 / (1 + required return)
Po = D * (1 + constant growth) / (required return - constant growth)
EM = 1 / ratio of ROE to ROA
ROE = ROA * EM
req reserve + excess res + loans + t bill = deposits + capital
req reserve = deposit * ratio
gap analysis => i rate * (rate sensitive assets - rate sensitive liability)
raise in interest ^ asset return, V liability
^ money supply, ^ stock price, do not buy
investors acting on best info in 90's -> 2001 bubble
% Representation of grammar. Nonterminals expr, term, term_tail,
% and factor_tail are represented as non(e, _), non(t, _), non(tt, _),
% and non(ft, _), respectively. Special nonterminal start is encoded
% as non(s, _).
% Terminals num, -, and * are represented by term(num,_), term(minus,_)
% and term(times, _). Special terminal term(eps, _) denotes the epsilon
% symbol.
%
% Productions are represented with prod(N, [H | T]) --- that is, arguments
% are the production index N and a list [H | T] where the head of the
@dmastylo
dmastylo / sumList.scm
Created April 2, 2014 22:23
Scheme sumList
(define (sumList x)
(if (null? x) 0)
(else (+ (car x) (sumList (cdr x)))
)
)
(define (addToStack expr extra_arg)
(cons expr extra_arg)
)
(define (popStack extra_arg)
(cond ( (null? (car extra_arg)) '() )
( else (cdr extra_arg) )
)
)
@dmastylo
dmastylo / test.scm
Last active July 29, 2017 04:36
scheme
(define (func (lambda (n cnt)
(if (= n 1)
cnt
((func (quotient (+ n 1) 2) (+ 1 cnt)))
)
)
@dmastylo
dmastylo / rev_with_foldr.scm
Created April 7, 2014 19:14
Reverse a list with foldr
(define (rev l)
(foldr (lambda (n list) (append list (cons n '()))) l '())
)
```set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin() " alternatively, pass a path where Vundle should install plugins "
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'