Monday, February 2, 2015

SAS Program

(1)

找到一个SAS sample code网站,还有momentum和event study的code。





  1. Information for using WRDS at WVU

    www.be.wvu.edu/wrds/home/

    West Virginia University
    Information for using WRDS at WVU ... CCM (CRSP/Compustat Merged) User Guide. Training Session about CCM ... WRDS PC-SAS User Guide. SAS Basic  ...

(2) Fama French sample code

Using Eventus® for WRDS through PC SAS Connect ...

www.eventstudy.com/Eventus-for-WRDS-through-PC-SAS-Remote.pdf

Using Eventus® for WRDS through. PC SAS/Connect Remote Submission. Arnold R. Cowan. Cowan Research LC and Iowa State University. This version: April ...


(3) Compustat-CRSP

Retrieving Data from CRSP and Compustat Using the ...

www.kellogg.northwestern.edu/.../CRSP...

Kellogg School of Management
Jan 25, 2008 - Goals: Provide and overview of the CRSP and Compustat data and useSAS to ... Users may also connect to the WRDS' server using an X.
You visited this page on 2/2/15.

(4) IBES-CRSP-Compustat


  1. sas_util/ibes_link.sas at master · jblocher/sas_util · GitHub

    https://github.com/jblocher/sas_util/blob/master/ibes_link.sas

    Scores links from 0 (best link) to 6 */. /* */ ... SPEDIS(cname,comnam)=0 is a perfectscore and SPEDIS < 30 is usually .... else if name_dist < 30 then SCORE = 2;.
(5) first.gvkey; first.variable


  1. How the DATA Step Identifies BY Groups - SAS

    support.sas.com › ... › SAS 9.2 Documentation
    SAS Institute
    How SAS Determines FIRST. ... This example shows how SAS uses the FIRST.variable and LAST.variable to flag the beginning and end of four BY groups: State ...
    You visited this page on 2/3/15.
http://support.sas.com/documentation/cdl/en/lrcon/62955/HTML/default/viewer.htm#a000761931.htm


(6) SAS function - prxparse

265-29: An Introduction to Perl Regular Expressions in SAS 9

www2.sas.com/proceedings/sugi29/265-29.pdf
SAS Institute
by R Cody - ‎Cited by 6 - ‎Related articles
Both SAS regular expressions (the RX functions) and Perl regular expressions (the ... The PRXPARSE function is used to create a regular expression. Since this ...


Leone源程序(我喜欢用"源"这个字,任性)
rerisk=prxparse('/risk[sy]?[^\-]|uncertain/i');


我把程序改成了:
re_sp=prxparse('/spinoff*|spin-off*|spin off*|spinco/i');

貌似在每个关键词后加/i,行不通。也不知道/i放在最后,有没有囊括全部关键词,不区分大小写。*表示后面可能有更多字母,比如"s"但,也许[s]也是不错的选择。

我检测了一个文件,貌似大写在spinoff也是有用的!所以虽然只有一个/i,但是全文通用。




Saturday, January 31, 2015

Dairy 20150131

(1) Allen (2001)这篇文章讲了Insider trading和spin Off的关系,所以这应该是回应information asymmetry最好的例子了。管理层知道内情的,但是外人不知道!

[PDF] Private Information and Spin-off Performance*

JW Allen - The Journal of Business, 2001 - JSTOR
Following pro rata spin-offs, shareholders, including insiders, trade their stock holdings in
public subsidiaries independently of trades in parent firms. This article examines the
predictive ability of informed trading with respect to post-spin-off stock performance and ...

(2) 力力说,把REITs的spinoff单独列出!憋忘了!!!

(3) Spinoff领域经典paper,讲了长期的股票走向。

Firm performance and focus: long-run stock market performance following spinoffs

H Desai, PC Jain - Journal of financial economics, 1999 - Elsevier
... Panel B reports the change in the number of segments reported by the company over the same
period for the ... Stock market performance of the pro-forma combined firm. Raw buy-and-hold returns
of the sample firms (RAWF), raw buy-and-hold returns of the benchmark portfolio ...

记清楚区别:

A split-up is a distribution of the shares of all the subsidiaries that comprise the "rm, thus the parent ceases to exist upon the completion of the transaction. In a split-off, parent's shareholders have to exchange the shares of the parent to obtain the shares in the subsidiary.

In an equity carveout, the parent sells some of the shares of the subsidiary to the public and, therefore, a carve-out is distinct from a spinoff as the parent receives cash in a carveout. Also, unlike a spinoff, the parent usually retains a controlling interest in the subsidiary.

Sample也删除了REITs

Royalty Trusts, Real Estate Investment Trusts or Limited Partnerships


时间结点很有意思。spinoff当月,还有之前的MV对比。


似乎也应该加一张如上focus和segment变化表格。

文章提到了Buy and Hold在母公司,子公司的回报率,但是没有说到IPO的underprice,为什么这件事情,我就过不去了呢???

(4) 和手册里是一样一样的。几张图很有用。Eckbo and Thorburn (2013)

Corporate restructuring

BE Eckbo, KS Thorburn - Foundations and Trends in Finance, …, 2013 - papers.ssrn.com
Abstract: We survey the empirical literature on corporate financial restructuring, including
breakup transactions (divestitures, spin-offs, equity carveouts, and tracking stocks),
leveraged recapitalizations, and leveraged buyouts (LBOs). For each transaction type, we ...





(5) 蛮奇怪的一篇文章,用的德国数据,在潜在的技术类spin off公司中,随机挑选了一些,然后处理了一下,居然也有144个样本。简单说,如果母公司对于子公司的spin off有负面消极作用,总的来说,这件事是不会好了。。。脱饭哪有那么简单???

Parent hostility and spin‐out performance

SG Walter, S Heinrichs, A Walter - Strategic Management …, 2014 - Wiley Online Library
Spin-outs (entrepreneurial ventures by exemployees) are legion in many high-tech
industries and are well known as strong innovators (Agarwal et al., 2004). A growing body of
literature has highlighted that parent relations allow spin-outs to outperform other new ...

(6) 这个是吐槽SDC Issuing的。一个NYU的教授总结的。

DATA QUALITY ISSUES IN SDC
http://pages.stern.nyu.edu/~aljungqv/research.htm



Friday, January 30, 2015

XAMPP

1. XAMPP开机

2. 打开浏览器

输入:localhost


3. phpmyadmin->mysql
已经创建了一个新的数据库test,
在test下面新建了一个表单叫new

这里可以输出结果。

Dairy 20150130

2002年的Perl抓文件,报错!

Dairy 20150129

昨天基本在调试Perl。2014年的s-1 filings,从Edgar下载,高达26.7G。有点夸张。

又买了个2T的硬盘,用以下载1994-2013数据。哇。过了一整晚,只完成了94-99年。体积不是特别大,99年10G左右,看来搜索很花时间。

好吧,今天周四,继续读paper。两台电脑同时运作。已经极限了。

(1) 这篇文章讲的是子公司在spin off,他的post-spin off performance和母公司的关系。比如母公司持有的股份多少,还有Monitoring的强度多少等等。简单来说,太多或太少介入都不好。

  1. Examining the performance effects of post spin‐off links to ...

    onlinelibrary.wiley.com › ... › Vol 32 Issue 10
    John Wiley & Sons
    by M Semadeni - ‎2011 - ‎Cited by 25 - ‎Related articles
    Apr 6, 2011 - Examining the performance effects of post spin-off links to parent firms: should the apron strings be cut? Matthew Semadeni1,* and; Albert A.
(2) 这篇文章讲家族关系和拆分。

[PDF] Corporate Divestitures and Family Control

ER Feldman, RR Amit… - Academy of Management …, 2013 - rotman.utoronto.ca
Abstract This paper investigates the relationship between divestitures and firm value in
family firms. Using hand-collected data on a sample of over 30,000 firm-year observations,
we find that family firms are less likely than non-family firms to undertake divestitures, ...


(3) 讲的spinoff和buyout之间的决策。spinoff后的两年,performance比buyout公司好,但是第三年起,就是Buyout公司比较好。另外,对于R&D还有marketing的投资,可以解释部分buyout公司后劲较足的原因。

Spinoffs versus buyouts: Profitability of alternate routes for commercializing innovations

G Rubera, GJ Tellis - Strategic Management Journal, 2013 - Wiley Online Library
ABSTRACT This research compares the performance of spinoffs and buyouts divested to
commercialize innovations. The authors study 145 spinoffs and 121 buyouts that occurred in
the US between 1996 and 2005. Analysis provides three critical findings. First, spinoffs ...


Tuesday, January 27, 2015

Text Mining

(1) 第一个是pdf,第二个是youtube教程。貌似主要命令是proc hptmine

Enabling High-Performance Text Mining - SAS

https://support.sas.com/.../Tips-High-Performance-Text-Min...

SAS Institute
HPTMINE and HPTMSCORE. This option allows for high performance execution usingSAS® code specification. Both of these high performance text mining  ...



  1. SAS® High-Performance Text Mining - YouTube

    www.youtube.com/watch?v=k5ydJXWf6Ug

    Oct 23, 2013 - Uploaded by SAS Software
    Alan Zhao, in the Analytics Product Management department atSAS, show how to handle very large problems ...
(2) Leone的主页,关于Perl和SAS macro运用



  1. Perl Resources - University of Miami

    https://sbaleone.bus.miami.edu/PERLCOURSE/Perl_Resources.html

    Andy Leone's Perl Page. Below are some programs for, among other things, downloading and extracting data from Edgar using Perl. If you are new to Perl, there ...
有关于Event study算简单的median, mean, std
也有winsorize的macro版本。
各种抓东西的perl程序。

(3) 琳娜给了一个简单的SAS search code

http://www.ats.ucla.edu/stat/sas/faq/index_function.htm

(4) Eric给了一个R的文本

Hands-On Data Science with R Text Mining - One Page R

onepager.togaware.com/TextMiningO.pdf
Nov 5, 2014 - Data Science with R. Hands-On. Text Mining. 1 Loading a Corpus. A corpus is a collection of texts, usually stored electronically, and from which ...

可以总结词汇,成为一个word cloud。用R语言,好神奇!


Dairy 20150127 - Tuesday

(1) 看到John J. McConnell的database,有carve-out,也有spinoffs.

    Krannert School of Management - John J. McConnell


  1. www.krannert.purdue.edu/.../mcconnell...
    Krannert School of Management
    Purdue University ... John J. McConnell - Publications ... Predictability of Long-TermSpinoff Returns · S&P 500 ... Can Takeover Losses Explain Spin-off Gains?
  2. (2) 这公司算是科研机构,先后有130多位full professor给他们工作。spin off了很多高科技公司。随便看看。


  1. Spin-off companies' details | CWI Amsterdam | Research in ...

    www.cwi.nl/general/spinoff-companies
    Centrum Wiskunde & Informatica
    CWI has created a number of spin-off companies: companies founded by CWI employees, with ... Development of database technologies for Business Analytics
(3) 这文很有意思,其中有一个列表,讲了tracking stock的去向,数了数,有8个最后被spin off。值得注意的是,即使被宣告dissolve,不论以什么形式,包括spin off,市场仍旧有正效应,positive CAR。至少说明,在spinoff的CAR中,有一部分效应,不来自于information asymmetry的降低。

Off Track: The Disappearance of Tracking Stocks

T Davidson, J Harper - Journal of Applied Corporate Finance, 2014 - Wiley Online Library
... by Travis Davidson, Ohio University, and Joel Harper, Oklahoma State ... why tracking stocks have
largely stopped being issued, and why so many have been dissolved either through exchanges
of shares, or sales or spin-offs of the business units with tracking stock. ...

(4)这篇文章讲欧洲的spin off在长远期并没有像美国一样,大幅提升公司绩效和市值。

Do spin-offs really create value? The European case

C Veld, YV Veld-Merkoulova - Journal of Banking & Finance, 2004 - Elsevier
... The Krishnaswami and Subramaniam (1999) paper suggests the testable hypothesis that
spin-offs of firms with large information asymmetries are associated with higher abnormal returns
than spin-offs of firms with low information asymmetries. The Habib et al. ...

(5) 这篇文章是model paper,讲了spinoff的别样动机,就是spunoff的子公司,会更可能被收购,所以管理层就会好好努力,所以market value会增加。

A theory of corporate spin-offs

TJ Chemmanur, A Yan - Journal of Financial Economics, 2004 - Elsevier
... Habib et al. (1997) argue that spin-offs improve the quality of the information managers
and uninformed investors can infer from the prices of the firm's traded securities, therefore
leading to an increase in the expected price of the firm's equity. ...

(6) 这篇文章是Ohio State一个phd学生写的dissertation。

[PDF] Disclosure Tone of the Spin-off Prospectus and Insider Trading

W Choi - 2014 - etd.ohiolink.edu
... outliers that perform extremely well. They conclude that “post-spinoff stock returns do ... revealed
to market participants at the time of the spin-off.10 Feldman, Gilson, and Villalonga (2013)
analyze the content of analyst reports written about companies that ...