05477nam 2200673 450 991079091100332120200520144314.01-78328-438-2(CKB)2550000001280803(EBL)1611820(SSID)ssj0001216782(PQKBManifestationID)11661927(PQKBTitleCode)TC0001216782(PQKBWorkID)11197711(PQKB)10818894(OCoLC)880458043(MiAaPQ)EBC1611820(Au-PeEL)EBL1611820(CaPaEBR)ebr10868170(CaONFJC)MIL602134(OCoLC)878918488(PPN)22803809X(EXLCZ)99255000000128080320140610h20142014 uy 0engurcnu||||||||txtccrPython for finance build real-life Python applications for quantitative finance and financial engineering /Yuxing Yan ; cover image by Aniket SawantBirmingham, England :Packt Publishing,2014.©20141 online resource (408 p.)Community Experience DistilledIncludes index.1-78328-437-4 1-306-70883-4 Cover; Copyright; Credits; About the Author; Acknowledgments; About the Reviewers; www.PacktPub.com; Table of Contents; Preface; Chapter 1: Introduction and Installation of Python; Introduction to Python; Installing Python; Different versions of Python; Ways to launch Python; Launching Python with GUI; Launching Python from the Python command line; Launching Python from our own DOS window; Quitting Python; Error messages; Python language is case sensitive; Initializing the variable; Finding the help window; Finding manuals and tutorials; Finding the version of Python; Summary; ExercisesChapter 2: Using Python as an Ordinary Calculator Assigning values to variables; Displaying the value of a variable; Error messages; Can't call a variable without assignment; Choosing meaningful names; Using dir() to find variables and functions; Deleting or unsigning a variable; Basic math operations - addition, subtraction, multiplication, and division; The power function, floor, and remainder; A true power function; Choosing appropriate precision; Finding out more information about a specific built-in function; Listing all built-in functions; Importing the math moduleThe pi, e, log, and exponential functions""import math"" versus ""from math import *""; A few frequently used functions; The print() function; The type() function; Last expression _ (underscore); Combining two strings; The upper() function; The tuple data type; Summary; Exercises; Chapter 3: Using Python as a Financial Calculator; Writing a Python function without saving it; Default input values for a function; Indentation is critical in Python; Checking the existence of our functions; Defining functions from our Python editor; Activating our function using the import functionDebugging a program from a Python editor Two ways to call our pv_f() function; Generating our own module; Types of comments; The first type of comment; The second type of comment; Finding information about our pv_f() function; The if() function; Annuity estimation; Converting the interest rates; Continuously compounded interest rate; A data type - list; Net present value and the NPV rule; Defining the payback period and the payback period rule; Defining IRR and the IRR rule; Showing certain files in a specific subdirectory; Using Python as a financial calculatorAdding our project directory to the pathSummary; Exercises; Chapter 4: 13 Lines of Python to Price a Call Option; Writing a program - the empty shell method; Writing a program - the comment-all-out method; Using and debugging other programs; Summary; Exercises; Chapter 5: Introduction to Modules; What is a module?; Importing a module; Adopting a short name for an imported module; Showing all functions in an imported module; Comparing ""import math"" and ""from math import *""; Deleting an imported module; Importing only a few needed functions; Finding out all built-in modulesFinding out all the available modulesPython is a free and powerful tool which can be used to build a financial calculator and price options, and can also explain many trading strategies and test various hypotheses. In addition to that, real-world data can be used to run CAPM (Capital Asset Pricing Model), the Fama-French 3-factor model, estimate VaR (Value at Risk), and estimate spread, illiquidity, and liquidity. This book explores the basics of programming in Python. It is a step-by-step tutorial that will teach you, with the help of concise, practical programs, how to run various statistic tests. With this book, you will learnCommunity experience distilled.Python (Computer program language)FinanceMathematical modelsComputer programsPython (Computer program language)FinanceMathematical modelsComputer programs.005.133Yan Yuxing1501817Sawant AniketMiAaPQMiAaPQMiAaPQBOOK9910790911003321Python for finance3748742UNINA