From A Logical Point of View

QUIFRO

This blog, “From A Logical Point of View”, is not supposed to be owned by a logician. Actually, the book, From A Logical Point of View, is a collection of logical and philosophical essays by W.V.Quine(1908-2000), an American philosopher and mathematician.

A story about this book. From A Logical Point of View, was a calypso song by Robert Mitchum, an US actor, composer and singer. Quine enjoyed this music and used it as his new book, which is Quine’s best seller. Now I love this book and give the name to my blog from a logical point of view^.

Subscribe to from a logical point of view by Email

Work With Oracle: A Quick Sheet for SAS Programmers

(Note: All the followings are tested on Windows XP environment.)

0. Install Oracle Database 10g Express Edition

Fast (and free) to download, easy to deploy and simple to admin–for learning and testing purpose, Oracle Database 10g Express Edition (Oracle Database XE, a mini version of Oracle Database 10g Release 2) are strongly recommended:

0.1 Download it at its homepage(206MB);

0.2 Install it following default settings;

0.3 Unlock accounts for HR and SCOTT. In a windows DOS prompt, using the following scripts:

sqlplus sys/YourSysPassword as sysdba
alter user HR account unlock
alter user HR identified by YourHRPassword
alter user SCOTT account unlock
alter user SCOTT identified by TIGER
Or you can accomplish these tasks within the Oracle web application:
http://localhost:8081/apex

1. Connect Oracle using SAS libname engine

libname SCOTT oracle user=”SCOTT” password=”TIGER” path=’xe’ ;

Note: xe is the default path for Oracle Database XE.

2. Connect Oracle using SQL Procedure Pass-Through Facility

proc sql ;
connect to oracle as orcl
(user=”SCOTT” password=”TIGER” path=’xe’);

select *
from connection to orcl

(

SELECT …

) ;

disconnect from orcl;

quit;

Note: 1) In this approach, Oracle, instead of SAS, processes the SQL statement (i.e., you use the more powerful and flexible Oracle SQL syntax instead of SAS Proc SQL procedure for querying. For more, see SAS Doc).

2) Your Oracle SQL codes should be placed in the RED blocks, and end without a semicolon(;):

select *

from emp

3) Only basic Oracle SQL statements (select, create table, . . .)can pass through this facility.

3. Load SAS datasets to Oracle database

proc copy in=sashelp
out=scott;
select class;
run;

4. Misc: Some differences between Oracle SQL and SAS Proc SQL

4.1 Table aliases

Oracle: from employees a;

SAS: from employees a; or

from employees as a;

4.2 Column aliases

Oracle: don’t use single quotation marks(‘’).

select job_id as job, job_id job, job_id as “job” , job_id as ‘job’

SAS:

select job_id as job, job_id “job” , job_id ‘job’, job_id job

4.3 Literal Character Strings

Oracle: Date and character literal values must be enclosed within single quotation marks(‘’).

SAS: Use both single and double quotation marks.

4.4 Order the null value

Oracle: Null values are displayed last for ascending sequences and first for descending sequences.

SAS: Null values are displayed first for ascending sequences and last for descending sequences.

4.5 Nesting Group Functions

select max(avg(salary))
from employees
group by department_id

SAS log:

ERROR: Summary functions nested in this way are not supported.

Optional approach for SAS:

select max(avg) as max
from(
select avg(salary) as avg
from employees
group by department_id )

4.6 row number(_n_)

Oracle:

select rownum
from employees

SAS:

select monotonic()
from employees

Note: monotonic() is an undocumented function of SAS, seehttp://www2.sas.com/proceedings/sugi29/040-29.pdf

Subscribe to from a logical point of view by Email

Run data mining codes following William Potts

FYI: SAS Enterprise Miner and SAS Text Miner Procedures: Reference for SAS 9.1.3, see:
 
 
This entry DOES exist in the SAS Support website, but it can’t be found by any search engine or documentation tree view. You’re recommended to download these files immediately due to SAS’s easy-dead hyperlinks.^-^
 
ps.SAS Institute provides no support for the use of Enterprise Miner and Text Miner Procedures when they are invoked directly, outside of the Enterprise Miner graphical user interface.
Subscribe to from a logical point of view by Email

Free Machine Learning Courses (Stanford) in YouTube

FYI:
 
Subscribe to from a logical point of view by Email

SAS User Books and Data Mining Software Comparision: Quick Links

  1. SAS Books Catalog(Jan, 2009)
  2. Data Mining Software 2009: Succesul Analyses at Affordable Prices(Nov. 2008, by mayato)
Subscribe to from a logical point of view by Email

Basel II on Incremental Risk Charge(IRC): Quick Links

  1. Basel Committee on Banking Supervision(Jan, 2009). Guidelines for computing capital for incremental default risk in the trading book. Consultative document. January.
  2. IRC Comments by RiskMetrics
Subscribe to from a logical point of view by Email

FYI: Dashboard using SAS/Graph

see, http://support.sas.com/kb/26/134.html

You would also like, Santa’s Dashboard:
http://jiangtanghu.blogspot.com/2008/12/santa-and-sas-again-santa-dashboard.html

Subscribe to from a logical point of view by Email

R or SAS: Quick Links to the Recent Debates


Original post, 7 Jan, 2009

Key Point
The popularity of R at universities could threaten SAS Institute.

A Controversial Review by Anee Milley from SAS
We have customers who build engines for aircraft. I am happy they are not using freeware when I get on a jet.

7 Jan, 2009,
SAS-L
Discussion in SAS-L, the most popular SAS mailing list. Most voices call for the incorporate both R and SAS.

7 Jan, 2009,
R-help
Cheer for the victory of R.

8 Jan, 2009,
Ashlee Vance’s blog
R You Ready for R, with lots of comments

9 Jan, 2009,
SAS Consulting

9 Jan, 2009, Anee Milley
This Post Is Rated R, stating the viewpoints from SAS about open source software: support and participant.
For more, see Google Blog Search.
Subscribe to from a logical point of view by Email

Options Pricing Using SAS

There are some new financial functions in SAS9.2 Base, including 8 options pricing functions(formerly in SAS Risk Dimension). These functions can compute the price of both call and put options on different underlying assets (stock, futures, currency, and exchange asset), using the following models respectively:

Model Underlying Call Put
Black model Futures BLACKCLPRC BLACKPTPRC
Black-Scholes model Stock BLKSHCLPRC BLKSHPTPRC
Garman-Kohlhagen model Currency GARKHCLPRC GARKHPTPRC
Margrabe model Exchange MARGRCLPRC MARGRPTPRC
  • BLACKCLPRC: calculates the call price for European options on futures, based on the Black model.
  • BLACKPTPRC: calculates the put price for European options on futures, based on the Black model.
  • BLKSHCLPRT: calculates the call price for European options, based on the Black-Scholes model.
  • BLKSHPTPRT: calculates the put price for European options, based on the Black-Scholes model.
  • GARKHCLPRC: calculates the call price for European options on currencies, based on the Garman-Kohlhagen model.
  • GARKHPTPRC: calculates the put price for European options on currencies, based on the Garman-Kohlhagen model.
  • MARGRCLPRC: calculates the call price for European options on exchange assets, based on the Margrabe model.
  • MARGRPTPRC: calculates the put price for European options on exchange assets, based on the Margrabe model.

For more,see SAS9.2 online help,Functions and CALL Routines by Category: Financial
http://support.sas.com/documentation/cdl/en/lrdict/59540/HTML/default/a000245860.htm

Note: A good web site for options pricing with different models, http://www.montegodata.co.uk/

Subscribe to from a logical point of view by Email

Happy New Year

新年快乐 ( Xin Nian Kuai Le),

Guten Rutsch ins neue Jahr,
Bonne Année,
Nav varsh ki shubh kamnayey,
Felice Anno Nuovo,
Feliz Año Nuevo,
Feliz Ano Novo,
明けましておめでとうございます (Akemashite Omedetô),
Gelukkig Nieuwjaar,
Szczęśliwego Nowego Roku,
Καλή Χρονιά (Kalí Chroniá),
Seh Heh Bok Mani Bat Uh Seyo,
חג חנוכה שמח (Hag Hanukkah Sameah),
Cчастливого Нового Года,

Happy New Year,

Subscribe to from a logical point of view by Email

Links: Risk Intelligence Vendors Review: 2008

You can get the big picture viewing different sources(REMEMBER: A vendor’s research methodology is as important as its rating):

Chartis RiskTech 100 (October 2008)

FinTech100(2008)
FinTech100(2008): Top 25 Enterprise Companies
FinTech100(2008): Banking Top 10
FinTech100(2008): Capital Market Top 10
FinTech100(2008): Insurance Top 10
Celnet Credit Risk/Basel II Vendors(2008):
Subscribe to from a logical point of view by Email

Links–BI Industry 2008: Review and Prospect

/*Thanks the hints supplied by:

A look back at 2008 and some crystal ball predictions…, byTammi Kay Geroge, from SASBlog*/

Major Data Warehousing Events of 2008 (and Predictions for 2009), by Michael Schiff, from TDWI,

Major Data Warehousing Events of 2008:

  • Everyone had an appliance story
  • Industry consolidations continued
  • The recessionary environment encourage further BI developments
  • Open source grew

Predictions for 2009:

  • Further industry consolidation(Informatica by HP, SPSS by SAP)
  • Cloud computing will come down to earth
  • Open source growth will accelerate
  • The IT world will become greener
  • Major emphasis on solutions rather than tools and technology

BusinessIntelligence Tools: Year in Review,by Cindi Howson, from BeyeNetwork

Top Virtualization Trends for 2009, by John Suit, from ZDNet

Surround the Warehouse: Prediction for 2009 , by Neil Raden, from IntelligentEnterprise

Subscribe to from a logical point of view by Email

Industry Review: SAS and Teradata Partnership

SAS and Teradata Partnership: Press

  1. Leading Companies See Value in SAS and Teradata Partnership
  2. SAS and Teradata Unveil Advantage Program to Bring Powerful In-Database Solutions and Services to Customers
  3. SAS and Teradata Enter into Strategic Partnership


In BI industry, the pure players such as SAS, Teradata and Microstrategy, need to demonstrate their indispensable values against the megavendors, IBM (acquired Cognos), SAP (acquired Business Object), Oracle (acquired Hyperion) and Microsoft. Teradata is solely focused on enterprise data warehouse. SAS, dominating in business analytics (e.g. advanced statistics and data mining), will check and balance the BI industry due to the private-hold structure. SAS and Teradata Advantage Program partnership, includes wide business lines, such as Analytics, AML (Anti-Money Laundering), Credit Risk, Enterprise Intelligence and Optimization Services. I think It’s a effective way to learn from each other in mutual emulation and counterbalance the concentration market.

Subscribe to from a logical point of view by Email

Santa and SAS Again: Santa’s Dashboard

santaDashBoard

(santaDashBoard.png, With permission by Mr. Robert Allison)

Merry Christmas again. SAS marketing staff started up an interesting Christmas campaign on how Santa operates his workshop. Here is another wonderful work about Santa’s Dashboard, created by SAS senior R&D staff, Robert Allison.

Robert is a master of graphics and visualization. You can view his SAS/Graph examples in the following link:

http://robslink.com/SAS/Home.htm

Subscribe to from a logical point of view by Email

The Making of an Analyst: A Supplement to What Makes a Good Business Analyst

I once commented the entry, What Makes a Good Business Analyst by Rajan Chandras, with an easy tone, If You Can Make it Here, You Can Make it Anywhere. The standards of a good analyst conclude by Rajan, in my opinion, are somewhat of very high bars.

In the recent SASCOM Magazine, Ted Cuzzillo published a relatively moderate enty, say, The Making of An Analyst. This paper is considered the fresh graduates to be an analysts in their first job hunting. Yes, there two posts are more compatible than oppositive. Rajan’s targets are those veteran analysts with years of experience.
Subscribe to from a logical point of view by Email

Learn Time Series Analysis: Free Materials for SAS Users

0. A gentle Introduction to Time Series Analysis, may serve as fast learning materials:
1. An open source book(with data and code), A First Course on Time Series Analysis: examples with SAS, by Prof. Michael Falk, is available in:
2. A SAS User book, Forecasting Examples for Business and Economics Using SAS by B. Cohen (another popular SAS User book for time series is SAS for Forecasting Time Series by John Brocklebank and David Dickey), is example-driven approach. You can review and submit the codes to learn SAS for time series analysis in a comprehensive way–there are 30 examples available:

1. Forecasting an Autoregressive Progress
2. Forecasting a Moving Average Process
3. Forecasting a Seasonal Process
4. Seasonal Adjustment and Forecasting
5. Forecasting with Transfer Function Models
6. Forecasting with Intervention Models
7. Forecasting Multivariate Time Series
8. Preparing Time Series Data for Forecasting
9. Using Macros for Forecasting Tasks
10. Fitting and Forecasting a Linear Model by OLS
11. Testing Forecasting Models for Break Points with Chow Tests
12. Fitting and Forecasting Linear Models with Linear Restrictions
13. Fitting and Forecasting a Linear Model with an AR Error Correction
14. Fitting Linear Models with Heteroscedastic Error Terms
15. Fitting Linear Models with ARCH-GARCH Error Terms
16. Assessing Forecast Accuracy
17. Forecasting Using a Lagged Dependent Variable Model
18. Static and Dynamic Forecasting Using a Lagged Dependent Variable Model
19. Fitting and Forecasting Polynomial Distributed Lag Models
20. Fitting and Forecasting Restricted Polynomial Distributed Lag Models
21. Fitting and Forecasting a Linear System by SUR and ITSUR
22. Testing and Restricting Parameter Estimates in a Linear System Forecast
23. Producing Goodness-of-Fit Statistics for Forecasts of a Linear System o
24. Fitting a Linear System by Instrumental Methods
25. Linear System Diagnostics and Autoregressive Error Correction
26. Creating Forecast confidence Limits with Monte Carlo Simulation
27. Fitting and Forecasting a Nonlinear Model
28. Restricting and Testing Parameters of a Nonlinear Forecasting Model
29. Producing Forecasts Automatically Using the Time Series Forecasting Sys
30. Developing Forecasting Models Using the Time Series Forecasting System

You can get the code with data and proc steps in SAS website:
3. SAS/ETS User’s Guide and Procedure Guide in SAS Product Documentation:
Subscribe to from a logical point of view by Email

Links of 2008-12-16: Financial Engineering, Ponzi Scheme, SAS PC Game

  1. The State of Financial Engineering
  2. Ponzi Scheme Returns: SEC Charges Bernard L. Madoff for Multi-Billion Dollar Ponzi Scheme
  3. WolfenSAS: A PC Game written by SAS Code
Subscribe to from a logical point of view by Email

Delivers the Right Toys and Goodies to the Right Boys and Girls: Story of Santa and SAS

How to know the boys and girls’ real demands around the world? and how to predict their demands in next Christmas?

How to purchase toys and goodies with a balance of costs and profits? and how to deliver them more efficiently?

There are lots of questions in the list of Santa, CEO of Santa’s Workshop. SAS’s marketing staff held a very creative champion for the coming Christmas. You can watch the interview with Santa in youtube.com, or read the success story about Santa, Santa’s Secret: Magic? No. It’s SAS(R) Business Analytics.

Merry Christmas.

Subscribe to from a logical point of view by Email

If You Can Make it Here, You Can Make it Anywhere: On What Makes a Good Business Analyst by Rajan Chandras

In the latest post, What Makes a Good Business Analyst?, Rajan Chandras cites some soft items from Forrester’s Business Analyst Assessment Workbook:

  • Ability to think abstractly, identify patterns, and generate ideas and solutions
  • Understanding of when and how to escalate issues or needs
  • Understanding of and ability to delivery the appropriate level of detail needed for each task
  • Interest in exploring and understanding new concepts and topic areas
  • Emotionally invested in the work
  • Ability to learn by shadowing stakeholders
  • Ability to clearly articulate technology in terms stakeholders can understand
  • Understanding of the organizational culture and its impact on processes and projects (this one seems obvious, but the latter phrase is more profound than might seem at first glance)
  • Ability to drive a decision analysis and selection process
  • Ability to recognize patterns in requirements and categorize them appropriately

What’s more, there are some suggestions by Rajan Chandras himself:

  • Know the organization’s external environment: its competitive position, current state of the industry, geographical & social factors, etc.
  • Know the organization’s internal environment: its financial position, organization culture, IT maturity, etc.
  • Adapt to the needs (your language, dress etc.), but be yourself. Imperfect, yet genuine, is fine; falsity comes through easily, and will destroy your credibility in no time.

No doubt, no boss can reject such a perfect analyst. But I’m afraid these standards are suitable for every professionals. That is to say, they create a model to explain everything. It is too universal to be served as a good filter to select the most proper analysts. She or he may more marketable in any other business line.

Subscribe to from a logical point of view by Email

Data Mining in Stock Market

Data Mining in Stock Market? Is it crazy? or is it just a hopeless try? Every mentor in mathematics and finance educates us that the stock market is too chaotic and sentimental to use mathematical models. Most of all gift rock scientists are concentrated in the study of interest of rates and fixed income securities. It sounds profitable to use mathematical and statistical models to predict the price of stock, but there are little successfull stories.

I know I might hold some academic doctrines, so I have interest to monitor any effort to try to forecast stock prices using data mining techniques. Some links from a popular data mining blog , Data Mining Research, are listed as follows:

Subscribe to from a logical point of view by Email