Sunday, December 9, 2007

我的投资策略

1. 只买不卖,长期投资.
在熊市中持续买入优质股,坚持持有至20年后才等待机会卖出.
熊市定义:从高出下跌50%以上,每半年买一次,每次2K - 10K.
板块优质股:
a. 金融
1) 000001 深发展 2) 002142 宁波银行 3) 601009 南京银行 4) 601166 兴业银行 5) 601169 北京银行
6) 601318 中国平安 7) 601628 中国人寿 8) 601328 交通银行 9) 601998 中信银行

b. 地产
1) 000002 万科 2) 000024 招商地产 3) 600113 浙江东日 4) 600193 创兴置业 5) 600246 万通地产
6) 600393 东华实业 7) 600463 空港股份 8) 600641 万业企业 9) 600675 中华企业
10) 600606 金丰投资

c. 能源,电力,资源
1) 000096 广聚能源 2) 000534 汕电力 3) 000939 凯迪电力 4) 600098 广州控股 5) 600864 岁宝热电
6) 600886 国投电力 7) 600969 彬电国际 8) 000060 中金南岭 9) 000612 焦作万方 10) 002082 栋梁新材
11) 002114 罗平锌电 12) 600255 鑫科材料 13) 600432 吉恩镍业 14) 600497 驰宏锌锗 15) 600558 大西洋

d. 生物医药
1) 000513 丽珠集团 2) 000623 吉林敖东 3) 000919 金陵药业 4) 000989 九芝堂 5) 002004 华邦制药
6) 600085 同仁堂 7) 600380 健康元 8) 600993 马应龙

e. 其它
1) 600616 第一食品 2) 000039 中集集团


2. 买卖ETF, 跟着感觉买指数.



3. 短期投机, 关键在于保住本金-Cash is the king!
买入信号:
RSI < 20, 获利10%-20%即出, 这里KDJ中 J < 0 信号有时会先于RSI信号出现,
内盘远远大于外盘(20%),表示庄家买入,跟进,获利5%-10%即出.




Tuesday, December 4, 2007

盘口变化盯庄家

挂单心理战

  在买盘或卖盘中挂出巨量的买单或卖单,纯粹是庄家引导股价朝某方向走的一种方法。其目的一但达到,挂单就撤消。这也是庄家用来引导股价的常用手法。当 买盘挂出巨单时,卖方散户心理会产生压力。是否如此大单买进,股价还会看高一线?相反,当卖盘挂出巨单时,买方散户会望而却步。斗智斗勇在盘口,散户只须 胆大心细,遇事不慌,信仰坚定,暂死跟庄。

  内外盘中显真情

  内盘是以买盘价成交的成交量,也就是卖方的成交量。

  外盘是以卖盘价成的成交量,也就是买方的成交量。庄家只要进出,是很难逃脱内外盘盘口的。虽可用对敲盘暂时迷惑人,但庄家大量筹码的进出,必然会从内外盘中流露出来。

  隐形盘中露马脚

  盘口中,买卖盘面所放的挂单,往往是庄家骗人用的假象。大量的卖盘挂单俗称上盖板,大量的买盘挂单俗称下托板。而真正庄家目的性买卖盘通常是及时成交 的,隐形盘虽在买卖盘口看不到,但在成交盘中是跑不了的。因此,研究隐形盘的成交与挂单的关系,就可看清庄家的嘴脸。

  盘口秘诀

  (1) 上有盖板,而出现大量隐形外盘,股价不跌,为大幅上涨的先兆。

  (2) 下有托板,而出现大量隐形内盘,为庄家出货迹象。

  (3) 外盘大于内盘,股价不上涨,警惕庄家出货。

  (4) 内盘大于外盘,价跌量增,连续第二天,是明眼人最后一次出货的机会。

  (5) 内外盘都较小,股价轻微上涨,是庄家锁定筹码。轻轻地托着股价上走的时候。

  (6) 外盘大于内盘,股价仍上升,看高一线。

  (7) 内盘大于外盘,股价不跌或反有微升,可能有庄家进场。

Replication Configuration Between MSSQL 2005 and Oracle



1. Oracle as publisher

1) Configuring an Oracle Publisher
Replication modes are: snapshot and transactional replication.
Preparation steps before creating a publication from an Oracle:

1.1 Create a replication administrative user within the Oracle database using the supplied script.
Connect to the Oracle database using an account with DBA privileges and execute the script. This script prompts for the user and password for the replication administrative user schema as well as the default tablespace in which to create the objects (the tablespace must already exist in the Oracle database).
It is recommended that the schema be used only for objects required by replication; do not create tables to be published in this schema.
If you create user schema manually, you need grant schema the following permissions to user or via role:

CREATE PUBLIC SYNONYM and DROP PUBLIC SYNONYM
CREATE PROCEDURE
CREATE SEQUENCE
CREATE SESSION

and you must also grant the following permissions to the user directly (not through a role):
CREATE ANY TRIGGER. This is required only for transactional replication; snapshot replication does not use triggers.

CREATE TABLE
CREATE VIEW


1.2 For the tables that you will publish, grant SELECT permission directly on each of them (not through a role) to the Oracle administrative user you created.

For example, login to Oracle as user "SCOTT":

c:>sqlplus scott/tiger@ora101
SQL> grant select on DEPT to repluser;
Grant succeeded.
SQL> grant select on EMP to repluser;
Grant succeeded.


1.3 Install the Oracle client software and OLE DB provider on the Microsoft SQL Server Distributor, and then restart the server.
You can use Oracle Universal Installer and Network Configuration Assistant to configure Oracle database network connectivity.
The account under which the SQL Server service on the Distributor runs must be granted read and execute permissions for the directory (and all subdirectories) in which the Oracle client networking software is installed.
To test the connectivity, run "sqlplus /@" in command line, and you will see a SQL prompt.


1.4 Configure the Oracle database as a Publisher at the SQL Server Distributor.
Oracle Publishers always use a remote Distributor; you must configure an instance of SQL Server to act as a Distributor for your Oracle Publisher (an Oracle Publisher can only use one Distributor, but a single Distributor can service more than one Oracle Publisher). After a Distributor is configured, identify the Oracle database instance as a Publisher at the SQL Server Distributor through SQL Server Management Studio, Transact-SQL, or Replication Management Objects (RMO).
When you identify the Oracle database as a Publisher, you must choose an Oracle publishing option: Complete or Oracle Gateway. After a Publisher is identified, this option cannot be changed without dropping and reconfiguring the Publisher. The Complete option is designed to provide snapshot and transactional publications with the complete set of supported features for Oracle publishing. The Oracle Gateway option provides specific design optimizations to improve performance for cases where replication serves as a gateway between systems.
After the Oracle Publisher is identified at the SQL Server Distributor, replication creates a linked server with the same name as the TNS service name of the Oracle database. This linked server can be used only by replication. If you need to connect to the Oracle Publisher over a linked server connection, create another TNS service name, and then use this name when calling sp_addlinkedserver (Transact-SQL).


a. Script to grant Oracle permissions
This script is also available in the following directory after installation: :\\Program Files\Microsoft SQL Server\\MSSQL\Install\oracleadmin.sql.

-- PL/SQL script to create a database user with the required
-- permissions to administer SQL Server publishing for an Oracle
-- database.
--
-- &&ReplLogin == Replication user login
-- &&ReplPassword == Replication user password
-- &&DefaultTablespace == Tablespace that will serve as the default
-- tablespace for the replication user.


b. Managing Oracle tablespace

To specify a tablespace for an article logging table, you can specify a tablespace in the Article Properties dialog box or by using sp_changearticle (Transact-SQL).

http://download.microsoft.com/download/4/7/a/47a548b9-249e-484c-abd7-29f31282b04d/Repl_Quickstart_for_Oracle.doc


2) Design considerations and limitations for Oracle publisher
2.1 The Oracle Gateway option provides improved performance over the Oracle Complete option; however, this option cannot be used to publish the same table in multiple transactional publications. A table can appear in at most one transactional publication and any number of snapshot publications. If you need to publish the same table in multiple transactional publications, choose the Oracle Complete option.

2.2 Replication supports publishing tables, indexes, and materialized views. Other objects are not replicated.

2.3 There are some small differences between the storage and processing of data in Oracle and SQL Server databases that affect replication.
a. Oracle has different maximum size limits for some objects. Any objects created in the Oracle publication database should adhere to the maximum size limits for the corresponding objects in SQL Server.
b. By default Oracle object names are created in upper case. Ensure that you supply the names of Oracle objects in upper case when publishing them through a SQL Server Distributor if they are upper case on the Oracle database.
c. Oracle has a slightly different SQL dialect from SQL Server; row filters should be written in Oracle-compliant syntax.
d. Oracle triggers fire when rows containing LOBs are inserted or deleted; however updates to LOB columns do not fire triggers. An update to a LOB column will be replicated immediately only if a non-LOB column of the same row is also updated in the same Oracle transaction.
e. For both snapshot and transactional replication, columns contained in unique indexes and constraints (including primary key constraints) must adhere to certain restrictions:

I. The maximum number of columns allowed in an index on SQL Server is 16.
II. All columns included in unique constraints must have supported data types.
III. All columns included in unique constraints must be published (they cannot be filtered).
IV. Columns involved in unique constraints or indexes should not be null.

f. Primary key to foreign key relationships in the Oracle database are not replicated to Subscribers.


2.4 There are a number of differences in how transactional replication features are supported when using an Oracle Publisher.
a. Subscribers to Oracle publications cannot use immediate updating or queued updating subscriptions, or be nodes in a peer-to-peer or bidirectional topology.
b. Subscribers to Oracle publications cannot be automatically initialized from a backup.
c. SQL Server supports two types of validation: binary and rowcount. Oracle Publishers support rowcount validation.
d. SQL Server offers two snapshot formats: native bcp-mode and character-mode. Oracle Publishers support character mode snapshots.
e. Schema changes to published Oracle tables are not supported. To make schema changes, first drop the publication, make the changes, and then re-create the publication and any subscriptions.


3) Administrative considerations for Oracle publisher
3.1 Importing and loading data
Triggers are used in change tracking for transactional publications on Oracle. Changes to published tables can be replicated to Subscribers only if the replication triggers fire when an update, insert, or delete occurs. The Oracle utilities Oracle Import and SQL*Loader both have options that affect whether triggers will fire when rows are inserted into replicated tables with these utilities.
While using Oracle Import, if option "ignore" is set to 'n', the table is dropped and re-created during import. This removes replication triggers and disables replication.
With SQL*Loader, if option "direct" is set to 'false', rows are inserted using conventional INSERT statements, which fire replication triggers. If direct is set to 'true', the load is optimized, and triggers are not fired.

3.2 Making changes to published objects
The following action requires you to stop all activity on the published tables: Moving a published table.
The following actions require you to drop the publication, perform the operation, and then recreate the publication:

a. Truncating a published table.
b. Renaming a published table.
c. Adding a column to a published table.
d. Dropping or modifying a column that is published for replication.
e. Performing non-logged operations.

3.3 You must drop and reconfigure the Publisher if you drop or modify any Publisher level tracking tables, triggers, sequences, or stored procedures.


4) Performance tuning for Oracle publisher
4.1 The Oracle Gateway option provides improved performance over the Oracle Complete option; however, this option cannot be used to publish the same table in multiple transactional publications. A table can appear in at most one transactional publication and any number of snapshot publications. If you need to publish the same table in multiple transactional publications, choose the Oracle Complete option.

4.2 Changes to published Oracle tables are processed in groups called transaction sets. To ensure transactional consistency, each transaction set is committed as a single transaction at the distribution database. If the transaction set becomes too large, it cannot be processed efficiently as a single transaction. By default, transaction sets are created only by the Log Reader Agent. Transaction sets can be created with the Xactset job (an Oracle database job installed by replication), which uses the same mechanism that the Log Reader Agent does to create sets. To prevent the transaction set from becoming too large, ensure that transaction sets are created at regular intervals, even if the Log Reader Agent does not run or cannot connect to the Oracle Publisher.


5) Data type mapping for Oracle publisher


6) Backup and Restore for Oracle publisher
6.1 Ensure the Log Reader Agent does not run and that other database activity on the published tables does not occur while the Publisher is being backed up.

6.2 Backup up the Publisher and Distributor at the same time.

6.3 If the Publisher or Distributor must be restored, reinitialize all subscriptions.

6.4 To restore a Subscriber from a backup (without having to reinitialize subscriptions), the transactions delivered to the distribution database after the last subscription database backup was completed must still be available.

6.5 If the Publisher or Distributor becomes out of sync as the result of a database restore, the replication agents log error messages. At this point, you must drop and recreate all relevant publications and subscriptions.

6.6 If the Publisher must be dropped and reconfigured, drop the MSSQLSERVERDISTRIBUTOR public synonym and the configured Oracle replication user with the CASCADE option to remove all replication objects from the Oracle Publisher.


7) Objects created on Oracle publisher


2. Oracle as subscriber
1) General Considerations for Non-SQL Server Subscribers
1.1 Replication supports publishing tables and indexed views as tables to non-SQL Server Subscribers.
1.2 If a publication will have SQL Server Subscribers and non-SQL Server Subscribers, the publication must be enabled for non-SQL Server Subscribers before any subscriptions to SQL Server Subscribers are created.
1.3 The account under which the Distribution Agent runs must have read access to the install directory of the OLE DB provider.
1.4 By default, scripts generated by the Snapshot Agent for non-SQL Server Subscribers use non-quoted identifiers in the CREATE TABLE syntax.
1.5 If the SQL Server Distributor is running on a 64 bit platform, you must use the 64 bit version of the appropriate OLE DB provider.
1.6 Replication moves data in Unicode format regardless of the collation/code pages used on the Publisher and Subscriber. It is recommended that you choose a compatible collation/code page when replicating between Publishers and Subscribers.
1.7 If an article is added to or deleted from a publication, subscriptions to non-SQL Server Subscribers must be reinitialized.
1.8 The only constraints supported for all non-SQL Server Subscribers are: NULL, and NOT NULL. Primary key constraints are replicated as unique indexes.
1.9 Published schema and data must conform to the requirements of the database at the Subscriber.
1.10 Tables replicated to non-SQL Server Subscribers will adopt the table naming conventions of the database at the Subscriber.
1.11 SQL Server offers two types of subscriptions: push and pull. Non-SQL Server Subscribers must use push subscriptions, in which the Distribution Agent runs at the SQL Server Distributor.
1.12 SQL Server offers two snapshot formats: native bcp-mode and character-mode. Non-SQL Server Subscribers require character mode snapshots.
1.13 Non-SQL Server Subscribers cannot use immediate updating or queued updating subscriptions, or be nodes in a peer-to-peer topology.
1.14 Non-SQL Server Subscribers cannot be automatically initialized from a backup.


2) Configuring an Oracle Subscriber
2.1 Install and configure Oracle client networking software and the Oracle OLE DB provider on the SQL Server Distributor.
2.2 Create a TNS name for the Subscriber.
2.3 Create a snapshot or transactional publication, enable it for non-SQL Server Subscribers, and then create a push subscription for the Subscriber.
2.4 The account under which the SQL Server service on the Distributor runs must be granted read and execute permissions for the directory (and all subdirectories) where the Oracle client networking software is installed.


3) Considerations for Oracle Subscribers
3.1 Oracle treats both empty strings and NULL values as NULL. This is important if you define a SQL Server column as NOT NULL, and are replicating the column to an Oracle Subscriber. To avoid failures when applying changes to the Oracle Subscriber, you must do one of the following:
a. Ensure that empty strings are not inserted into the published table as column values.
b. Use the –SkipErrors parameter for the Distribution Agent if it is acceptable to be notified of failures in the Distribution Agent history log and to continue processing.
c. Modify the generated create table script, removing the NOT NULL attribute from any character columns that may have associated empty strings, and supply the modified script as a custom create script for the article using the @creation_script parameter of sp_addarticle (Transact-SQL).


VMs vs. Multiple SQL Server Instances


1. Performance
VM can not provide the same level of performance as the physical machine, most estimated VM overhead is at 10% - 15%.

2. Software Patching
VM will add more OS & software patching and administrative effort.

3. Backup/Recovery & Replication
VM has the advantage on backup/recovery and replication to another machine.

4. Licensing
Multiple SQL server instances don’t require any additional SQL Server licenses. For virtualization, each SQL Server system that’s running in a guest VM must be licensed—unless you’re running SQL Server 2005 Enterprise Edition, which provides unlimited VM usage.

如何从MACD指标研判股市走势?

MACD指标是市场上大多数投资者都熟知的分析工具,但在具体运用时,投资者可能会觉得MACD指标运用的准确性、实效性、可操作性上有很多令人茫然的地方,有时会发现用从书上学来的MACD指标的分析方法和技巧去研判股票走势,所得出的结论往往和实际走势存在着很大的差异,甚至会得出相反的结果。其中的主要原因是市场上绝大多数论述股市技术分析的书中关于MACD的论述只局限在表面的层次,只介绍MACD的一般分析原理和方法,而对MACD分析指标的一些特定的内涵和分析技巧的介绍鲜有涉及。本文将在介绍MACD指标的一般研判技巧和分析方法基础上,详细阐述MACD的特殊研判原理和功能。


MACD指标的一般研判标准主要是围绕快速和慢速两条均线及红、绿柱线状况和它们的形态展开,一般的分析方法主要包括DIF和MACD值及它们所处的位置、DIF和MACD的交叉情况、红柱状的收缩情况和MACD图形的形态这四个大的方面分析。

DIF和MACD的值及线的位置。1、当DIF和MACD均大于0(即在图形上表示为它们处于零线以上)并向上
移动时,一般表明股市处于多头行情中,可以买入或持股。2、当DIF和MACD均小于0(即在图形上表示为它们处于零线以下)并向下移动时,一般表明股市处于空头行情中,可以卖出股票或 观望。3、当DIF和MACD均大于0(即在图形上表示为它们处于零线以上)但都向下移动时,一般表明股票行情处于退潮阶段,股票将下跌,可以卖出股票和 观望。4、当DIF和MACD均小于0时(即在图形上表示为它们处于零线以下)但向上移动时,一般表明行情即将启动,股票将上涨,可以买进股票或持股待 涨。

DIF和MACD的交叉情况。1、当DIF与MACD都在零线以上而DIF向上突破MACD时,表明股市处于强势之中,股价将再次上涨,可以加码买进股票 或持股待涨,这就是MACD指标“黄金交叉”的一种形式。2、当DIF和MACD都在零线以下,而DIF向上突破MACD时,表明股市走势即将转强,股价 跌势已尽,将止跌朝上,可以开始买进股票或持股,这是MACD指标“黄金交叉”的另一种形式。3、当DIF与MACD都在零线以上而DIF却向下突破 MACD时,表明股市走势即将由强势转为弱势,股价将大跌,这时应卖出大部分股票而不能买股票,这就是MACD指标的“死亡交叉”的一种形式。4、当 DIF和MACD都在零线以下而DIF向下突破MACD时,表明股市将再次进入极度弱势中,股价还将下跌,可以卖出股票或观望,这是MACD指标“死亡交 叉”的另一种形式。


Latest Posts