ExperimentalFinanceLecture-6L

ExperimentalFinanceLecture-6L - Experimental Finance IEOR...

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
Experimental Finance IEOR Mike Lipkin, Pankaj Mody
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Experimental Finance Mike Lipkin, Alexander Stanton Page 2 Outline Problem set notes SQL statements continued Functions Stored Procedures Input/Output parameters Variable Declarations Cursors
Background image of page 2
Experimental Finance Mike Lipkin, Alexander Stanton Page 3 Problem Sets Think about the practical aspect of the question – all problem sets have financial meaning and require financial thinking. If in doubt, ask us! Explain your reasoning Retain your discoveries throughout your code (e.g. adjustment factors, formatStrike, date formatting) Don't use STD_OPTION_PRICE for historical research unless there is a good reason – this is an interpolated, standardized table and whether it is accurate or not is in the eye of the beholder The OptionTradeDates table was dropped (by accident we hope)
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Experimental Finance Mike Lipkin, Alexander Stanton Page 4 Pinning What is the purpose of using the following calculations for the pinning questions: – Open Interest – Average daily volume – Implied Volatility What statistic are we tracking and what might affect them? What biases are we trying to remove? What are we normalizing and why? These are all questions you should be asking yourselves, and us. This is a laboratory course! We are dealing with real-world numbers that are sometimes inaccurate, missing or plain wrong.
Background image of page 4
Experimental Finance Mike Lipkin, Alexander Stanton Page 5 Round vs. Truncate SELECT CAST(25.75 AS DECIMAL(7,0)) AS roundedValue SELECT CONVERT(DECIMAL(7,0), 25.75)) AS roundedValue
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Experimental Finance Mike Lipkin, Alexander Stanton Page 6 Round vs. Truncate SELECT CAST(25.75 AS DECIMAL(7,0)) AS roundedValue SELECT CONVERT(DECIMAL(7,0), 25.75)) AS roundedValue From To Behavior numeric numeric Round numeric int Truncate numeric money Round money int Round money numeric Round float int Truncate float numeric Round float datetime Round datetime int Round
Background image of page 6
Experimental Finance Mike Lipkin, Alexander Stanton Page 7 JOIN Performance SELECT ticker, closePrice, dbo.mbbo(bestBid, bestAsk) FROM security s INNER JOIN Security_Price sp ON s.SecurityID = sp.SecurityID INNER JOIN Option_Price_View o ON o.SecurityID = s.SecurityID AND o.date = sp.date
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Experimental Finance Mike Lipkin, Alexander Stanton Page 8 JOIN Performance SELECT ticker, closePrice, dbo.mbbo(bestBid, bestAsk) FROM security s INNER JOIN Security_Price sp ON s.SecurityID = sp.SecurityID INNER JOIN Option_Price_View o ON o.SecurityID = sp.SecurityID AND o.date = sp.date Always JOIN the least number of tables together Optimize for index use
Background image of page 8
Mike Lipkin, Alexander Stanton Page 9 JOIN Performance SELECT O.SecurityID, count(Strike) FROM Option_Price_View O INNER JOIN Security_Price S ON S.SecurityID = O.SecurityID AND DATEPART(dw,O.Expiration)-1 = DATEPART(dw, s.Date) WHERE O.SecurityID in (103125, 107525) AND O.Date BETWEEN '1996-01-01' AND '2005-01-01 b AND
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/14/2012 for the course IEOR 4726 taught by Professor Marco during the Spring '12 term at Columbia.

Page1 / 48

ExperimentalFinanceLecture-6L - Experimental Finance IEOR...

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online