RiskPremium

Measuring the market risk premium
Log | Files | Refs

rules.mk (1704B)


      1 #
      2 # RULES for MAKEFILE for the entry and asset pricing Project
      3 #
      4 #
      5 #
      6 # Created       March 24th  2020
      7 # Last modified March 24th  2020
      8 #
      9 #
     10 # --------------------------------------------------------------------------------------------------------
     11 
     12 
     13 # --------------------------------------------------------------------------------------------------------
     14 ifndef RULES_MK
     15 RULES_MK:=1# Allow repeated "-include".
     16 
     17 
     18 # --------------------------------------------------------------------------------------------------------
     19 # HOMEMADE SCRIPTS
     20 define colorecho
     21       @tput setaf 6
     22       @echo $1
     23       @tput sgr0
     24 endef
     25 WHITE='\033[1;37m'
     26 NC   ='\033[0m' # No Color
     27 
     28  # Timing: see here https://stackoverflow.com/questions/8483149/gnu-make-timing-a-build-is-it-possible-to-have-a-target-whose-recipe-executes
     29  TIME_START := $(shell date +%s)
     30  define TIME-END
     31  	@time_end=`date +%s` ; time_exec=`awk -v "TS=${TIME_START}" -v "TE=$$time_end" 'BEGIN{TD=TE-TS;printf "%02dm:%02ds\n", TD/(60),TD%60}'` ; echo -e \\t${WHITE}cumulative time elapsed ... $${time_exec} ... $@ ${NC}
     32 endef
     33 # --------------------------------------------------------------------------------------------------------
     34 
     35 
     36 # --------------------------------------------------------------------------------------------------------
     37 # This will depend on your configuration. Easiest is to symlin latest julia to /usr/bin/julia
     38 SHELL    := /bin/bash
     39 # adjust your WRDS username here
     40 WRDS_USERNAME := XXXX
     41 R_OPTS   := --vanilla
     42 # --------------------------------------------------------------------------------------------------------
     43 
     44 
     45 # --------------------------------------------------------------------------------------------------------
     46 endif